Learned today: Why DNS failed in Docker swarm containers

Our hosts are in 10.x.x.x network, and the DNS server IP is Now when we added an overlay network in Docker swarm without setting the subnet explicitly, Docker assigned the same subnet to the overlay network. When the container tried to resolve a name, it was not able to talk to the DNS server because IP packets got routed to the overlay network.

This was fixed by defining the subnets for overlay networks explicitly in another address range.

It was this GitHub issue that shed the light.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.