How to remove a worker node from the docker swarm cluster

0 votes

Hi Guys,

I have two worker nodes in the Docker swarm. Now I don't need one node. How can I remove the node from the Docker swarm?

Dec 24, 2020 in Docker by akhtar
• 38,210 points
1,404 views

1 answer to this question.

0 votes

Hi@akhtar,

To remove a worker node from the Docker swarm, run the following command from the worker node itself.

$ docker swarm leave

Node left the default swarm.

The node will still appear in the node list and marked as down. It no longer affects swarm operation, but a long list of down nodes can clutter the node list.

answered Dec 24, 2020 by MD
• 95,300 points

Related Questions In Docker

0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 10,550 points
2,142 views
0 votes
1 answer
0 votes
1 answer

How to find a Docker container IP address from the command line?

Hi@akhtar, You can use the docker inspect command ...READ MORE

answered Sep 4, 2020 in Docker by MD
• 95,300 points
1,901 views
+2 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,626 views
0 votes
1 answer

How to add one worker node to the Docker swarm?

Hi@akhtar, You will get one token when you ...READ MORE

answered Dec 24, 2020 in Docker by MD
• 95,300 points
101 views