Docker changes so fast so I'm trying to find out if a Docker Swarm (swarm mode) cluster can be upgraded. For instance say I am running 1.12 and I have a 3 node cluster running services. Let's also say Docker 1.13 comes out and I want to upgrade the engines that make up the swarm cluster. Is there anyway to do this that doesn't include recreating the cluster would prefer a almost a rolling engines update?
Thank you!
Important note: At the time of this writing, Docker Swarm is not dead. It is included in the Docker Community edition and Docker has not announced plans to deprecate it.
A Docker Swarm is a group of either physical or virtual machines that are running the Docker application and that have been configured to join together in a cluster. The activities of the cluster are controlled by a swarm manager, and machines that have joined the cluster are referred to as nodes.
Leave the swarmRun the docker swarm leave command on a node to remove it from the swarm. For example to leave the swarm on a worker node: $ docker swarm leave Node left the swarm. When a node leaves the swarm, the Docker Engine stops running in swarm mode.
Swarm mode is a Docker feature that provides built in container orchestration capabilities, including native clustering of Docker hosts and scheduling of container workloads.
Drain first node.
sudo docker node update --availability drain worker2
Verify No containers are on drained node.
sudo docker ps #on worker2
Check node in swarm manager.
sudo docker node ls
Change availablity to Active.
sudo docker node update --availability Active
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With