When I run rancher-agent on the same host as the server is running, the agent won’t show the public IP in the UI. Instead it shows a ip of the subnet that docker uses 172.17.0.0/16 net.
I’m having problem when I try to ping containers that belongs to the managed network, is the cause that the agent use a docker subnet IP instead of the public one?
I tried to ping from a container on one host to a container on another host, it didn’t work.
But after reading the docs about adding custom hosts thoroughly, I ran the agent container with the environment variable CATTLE_AGENT_IP and the agent container ( which is on the same host as the server ) shows the public IP.
So the containers of different hosts can now ping each other. Problem solved