Docker Community Forums

Share and learn in the Docker community.

Multi host overlay network not showing on workers


(Vchav73) #1

I need to enable communications between containers running on multiple hosts. I’m using docker 17.03 on CentOS 7.2. It seems the best way to do this is to use Swarm. I’ve followed the tutorial at https://docs.docker.com/engine/swarm/swarm-tutorial/ to create a swarm using three nodes:

[root@analytics ~]# docker node ls
ID                           HOSTNAME   STATUS  AVAILABILITY  MANAGER STATUS
179xi7zy0vdnrs59eqf9380zr *  analytics  Ready   Active        Leader
8mixkqwy1sddypqmb0ii3jyu7    app        Ready   Active        
w76vuc9y5c7sy9vgkcemei1jd    elk        Ready   Active  

From the leader I then created an overlay network:

[root@analytics ~]# docker network create -d overlay --attachable=true private

On the leader node I see the new overlay network:

[root@analytics ~]# docker network ls
NETWORK ID          NAME                         DRIVER              SCOPE
239abb9e947b        bridge                       bridge              local
0c511e8ff863        docker_gwbridge              bridge              local
33b3a1ee8743        host                         host                local
ni73lq0jsj7m        ingress                      overlay             swarm
6dbc508fc0e8        none                         null                local
3ek0guv35otj        private                      overlay             swarm

My problem is that on the worker nodes I do not see the new overlay network:

[root@elk ~]# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
38675f973020        bridge              bridge              local
eb0737204037        docker_gwbridge     bridge              local
a829acf0f3b3        host                host                local
ni73lq0jsj7m        ingress             overlay             swarm
77c23fc2de93        none                null                local

I’ve searched for a similar problem and read the on-line docs multiple times, but haven’t found a solution. I think I must be missing something. Any pointers?

Thank you.


(Markvr) #2

The network will only be extended to workers that are running services on the network. Start a service on the worker that uses the network, and then it will appear.


(Vchav73) #3

That was it. Thanks!