Hi!
Please, need some help here! I can’t find what I’m doing wrong.
I have 3 nodes: 1 VDS, 2 VPS
On each installed:
OS: Ubuntu 16.04.1 LST
Docker: 1.13.0.0
I have created a swarm:
on master
docker swarm init --advertise-addr EXTERNAL_IP
on 2 other nodes
docker swarm join ... (copied output from prev command)
Then on master
docker network create -d overlay test-nw
docker service create --name ping1 --network test-nw alpine ping docker.com
docker service create --name ping2 --network test-nw alpine ping docker.com
docker service create --name ping3 --network test-nw alpine ping docker.com
then I have tried lookup each service on each node and only running on same node service is reachable:
/ # nslookup ping1
nslookup: can't resolve '(null)': Name does not resolve
Name: ping1
Address 1: 10.0.0.2
/ # nslookup ping2
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'ping2': Name does not resolve
/ # nslookup ping3
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'ping3': Name does not resolve
on second node:
/ # nslookup ping1
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'ping1': Name does not resolve
/ # nslookup ping2
nslookup: can't resolve '(null)': Name does not resolve
Name: ping2
Address 1: 10.0.0.4
/ # nslookup ping3
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'ping3': Name does not resolve
on third:
/ # nslookup ping1
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'ping1': Name does not resolve
/ # nslookup ping2
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'ping2': Name does not resolve
/ # nslookup ping3
nslookup: can't resolve '(null)': Name does not resolve
Name: ping3
Address 1: 10.0.0.6
As far as I know, each container has it’s own IP (10.0.0.3, 10.0.0.5, 10.0.0.7) and IPVS resolves 10.0.0.2 to 10.0.0.3, 10.0.0.4 to 10.0.0.5, 10.0.0.6 to 10.0.0.7, but on each node only IP of running on it container is reachable and IP of its service, other IP are not reachable
For example on second node 10.0.0.2, 10.0.0.3, 10.0.0.6, 10.0.0.7 are not reachable (not only ping, I have tried run simple http server on each)
In all manuals this task looks simple, what I’m doing wrong?
Thanks.