I’m studying Docker Swarm and my personal lab has 3 managers and 2 workers. I’ve created an nginx service with
docker service create --name web --publish 8080:80 nginx and while I can see it in every manager once I do
docker service ls, I only can see its container with
docker ps in manager 2. Why is that? In production what happens if that manager fail? Is that how’s supposed to go?
In fact when I do
docker service update --replicas=4 web I see the 4 containers deployed 1 in every manager and 1 in one worker. And I’m a little lost here because I don’t know which thing goes into the managers and which on in workers. It would be awesome if anyone can enlight me here a little.
Thanks in advance.