3

I have three swarm nodes. Deployed containerized service with mode "global" through docker swarm.

Later, add one more swarm node to current to be four nodes. How can i deploy the container service to new added nodes?

The command(docker service scale) only be used with "replicated" mode.

TedJung
  • 71
  • 1
  • 8

1 Answers1

1

I would recommend running the following command if you have a lot of services running. This command will rebalance all services evenly across all the docker nodes.

docker service ls -q > docker_services && for i in `cat docker_services`; do docker service update "$i" --detach=false --force ; done

In case you have only one service then use this command

docker service update <service_name>
sam ben
  • 946
  • 9
  • 18