3

The embedded DNS server inside of Docker SWARM works well for communication within SWARM. But it seems it is impossible for clients outside of SWARM to discover the deployed services within SWARM unless manually notifying the outside world.

Is it possible to leverage CoreDNS like it is used by Kubernetes to fulfill this purpose?

I am not talking about the old port bounding of container to host IP. The scenario is about containers themselves can have routable IP addresses.

robert
  • 133
  • 4

1 Answers1

0

You can do this with CoreDNS and Traefik. Traefik will act as a load balancer and allow you to route to the containers based on container name. CoreDNS will take *.yourdomain.com and route it to traefik.

A good example is shown here: https://dklesev.github.io/devenv/

  • The given URL presents a rather complicated use case but it seems solve the problem though it may need more experiments to see if that can be used in production. I will try that later, thanks. – robert May 02 '19 at 17:50