192k views
2 votes
How do you remove a 'down' node from a swarm cluster?

A) docker swarm remove-node

B) docker node rm -f

C) docker swarm leave

D) docker node remove down

User Fejese
by
7.3k points

1 Answer

2 votes

Final answer:

To remove a 'down' node from a Docker swarm cluster, the correct command is 'docker node rm -f'. Running this command should be done from a manager node, and will help to manage the swarm by redistributing tasks previously assigned to the removed node.

Step-by-step explanation:

To remove a 'down' node from a Docker swarm cluster, you would generally use the command docker node rm or docker node remove, optionally with the -f flag if you need to forcefully remove a node that is unresponsive or in a 'down' state.

Specifically, the correct command from the provided options would be B) docker node rm -f. Please note that to run this command, you need to be operating from a manager node in the swarm. If you are on the node that needs to be removed, and it is still operational, you could use the command docker swarm leave. After a node is removed, the swarm will attempt to reconcile and redistribute tasks that were running on the removed node to other nodes in the cluster.

User Robynhenderson
by
8.0k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.