Services deployed in Swarm mode can be accessed each other by names.
Actual behavior
Services deployed in Swarm mode can not be accessed each other by names, but using IP is OK.
Additional Information
I tested this in a newly-created docker for aws cluster (with the GA couldformation).
Steps to reproduce the behavior
I created a zookeeper service, by sth like this:
docker service create --name zookeeper --hostname zookeeper …
I wanted to create a kafka service, and it will access the zookeeper service by the name “zookeeper”. But it didn’t work. I need to use the IP address of the zookeeper service.
Service discovery: Swarm manager nodes assign each service in the swarm a unique DNS name and load balances running containers. You can query every container running in the swarm through a DNS server embedded in the swarm.