I’m actually using proxy devices like this:
lxc config device add mycontainer http proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:80
Then I have a HAProxy using the port 8080 of the LXD machine.
But my HAProxy is contacting the machine on a private network, so there is no need to bind to
tcp:0.0.0.0:8080 which listen on the public network too.
I want to use something like
I do not want to specify an IP address as I’m running in a cluster mode. HAProxy is configured to use three backend (i.e 10.0.0.1, 10.0.0.2, 10.0.0.3) and chose the one available.
So if I’m moving the container to another LXD machine, nothing has to be done on HAProxy config.
Is it possible somehow?