I have a 3 node docker swarm cluster and I am trying to get the IPs of each one via docker node inspect node-1 --format '{{ .Status.Addr }}'
but I am having an issue where when the node I am trying for (example node-1
from above), that I get back 0.0.0.0
. This only happens on the leader node, the others work just fine.
What is happening in this case? Also, how can I use docker commands to get the IP of all the nodes when checking with their hostnames or docker node ls
?