222k views
5 votes
What will drain a cluster node to prevent services from running on it in the future (as a precursor to removing it)?

A) docker stop

B) docker drain

C) docker remove

D) docker pause

User Zavala
by
7.7k points

1 Answer

0 votes

Final answer:

To drain a cluster node and prevent services from running on it in the future (as a precursor to removing it), you should use the docker drain command.

Step-by-step explanation:

The correct answer is B) docker drain.

When you want to prevent services from running on a cluster node in the future as a precursor to removing it, you can use the docker drain command. This command will move all running containers from the node to other available nodes in the cluster, ensuring that the services continue running uninterrupted.

For example, if you have a cluster with multiple nodes and you want to remove one of the nodes, you can use the docker drain command to gracefully redistribute the containers and their services across the other nodes before removing the target node.

User Srnvs
by
7.9k points