Showing posts with label docker swarm. Show all posts
Showing posts with label docker swarm. Show all posts

3/13/2023

Decrease one node which involved in some docker swarm service without request fail.

 

.

When a node is shut down in a Docker Swarm, you can reduce the number of nodes while maintaining the availability of services by following these steps:

  1. Move the running services from the stopped node to another node. Use the command docker service update --move <service-name> to move the services to another node.

  2. After the services have been moved, remove the stopped node from the Docker Swarm with the command docker node rm <node-name>.

  3. Start the services again to maintain service availability. Use the command docker service update --force <service-name> to start the services again.

By following these steps, you can reduce the number of nodes while maintaining the availability of services. However, depending on the state of the services, availability may be temporarily reduced, so be careful. Also, it is recommended to back up before performing the above steps.

..


Thank you.

www.marearts.com

🙇🏻‍♂️

9/27/2021

docker swarm simple command

*install virtualbox

-+-

#install virtualbox on terminal
#osx
brew install virtualbox
#linux
sudo apt install virtualbox

-+-

 

* install docker-machine

...

#osx
curl -L https://github.com/docker/machine/releases/download/v0.16.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine
#linux
curl -L https://github.com/docker/machine/releases/download/v0.16.2/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && chmod +x /tmp/docker-machine && sudo cp /tmp/docker-machine /usr/local/bin/docker-machine

...


*docker-machine

...

#docker-machine basic cmd
docker-machine ls
docker-machine rm name
docker-machine kill name
docker-machine create name

...