0

I'm deploying a docker swarm using "docker stack deploy" and when I need to check the status of the services using either "docker service ls" or "docker service ps SERVICE_NAME" I get the list of all the services running in a tabular form but the column for node always shows up as "default". I searched online and I found this post which explain how we can know on which worker/manager each service is deployed. also found this post that shows how the nodes have the right value.

What I'm doing wrong that makes the nodes shows up as default only? is there a way to fix it?

docker version 17.09

tkyass
  • 2,968
  • 8
  • 38
  • 57

1 Answers1

0

By default, Docker swarm use the Emptiest node strategy to distribute service across all the nodes.

If all the services are deployed on the same node default. I could think on 2 reasons:

  1. The node manager is not able to see the other nodes. you can run this command docker node ls in your manager to check that the other nodes are available.

  2. there are some services already running on the other nodes, so docker will use the Emptiest to deploy.

Hemerson Varela
  • 24,034
  • 16
  • 68
  • 69
  • Thanks for your reply. There are two other nodes (workers) and all the services are deployed on the workers non is deployed on the manager but for some reason the actual name of worker node is not showing. Do I have to set node name when I join swarm members so this manager can recognize them and show them when I run docker service ps? – tkyass May 17 '18 at 03:56