Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading swarm mode cluster

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!

like image 891
learner Avatar asked Sep 29 '16 05:09

learner


People also ask

Is docker swarm still maintained?

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.

What is swarm cluster?

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.

How do I turn off Dockar in swarm mode?

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.

What is 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.


1 Answers

  1. Drain first node.

    sudo docker node update --availability drain worker2

  2. Verify No containers are on drained node.

    sudo docker ps #on worker2

  3. Upgrade docker engine.
  4. Check node in swarm manager.

    sudo docker node ls

  5. Change availablity to Active.

    sudo docker node update --availability Active

  6. Repeat the steps for other nodes.
like image 93
Farhad Farahi Avatar answered Oct 18 '22 19:10

Farhad Farahi