Portainer on a Docker Swarm .... Functionality #12484
-
Ask a Question!Hello Guys/Ladies, I am running a 4 node docker swarm in my homelab environment and I was wondering how do I know where the container gets deployed and also which IP do I use in the Enviroment Settings under Public IP? The reason I ask is as you know there are four IPs in my Swarm. Thank you guys very much. Michael |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @macooper59 "How do I know where the container gets deployed?" In Docker Swarm, the placement of containers is managed by Swarm’s scheduler. You can see where a container is deployed by checking the NODE column of your services. Here’s how you can check:
You can also use placement constraints to tell Swarm where exactly to run that service. For the Environment address you will use one of the Manager IP addresses. In a Swarm, only the manager nodes are responsible for orchestrating the cluster, so you should use the IP address of a manager node. |
Beta Was this translation helpful? Give feedback.
Hello @macooper59
"How do I know where the container gets deployed?"
In Docker Swarm, the placement of containers is managed by Swarm’s scheduler. You can see where a container is deployed by checking the NODE column of your services. Here’s how you can check:
You can also use placement constraints to tell Swarm where exactly to run that service.
For the Environment address you will use one of the Manager IP addresses. In a Swarm, only the manager nodes are responsible for orchestrating the cluster, so you should use the IP address of a manager node.