How to evacuate node

What would be the best way to evacuate a node (from the command line) so that maintenance could be performed on that node?

The scenario is - sysadmin wants to perform maintenance on a node. Without disruption to users, we want to cleanly shutdown all containers on that node. Those containers should be rescheduled on other nodes (we’re using kubernetes, so I’m guessing kube will take care of this aspect). We also want to disallow other containers from being scheduled on this node until the maintenance is complete. All of this needs to happen at the command line (API is fine).

Thanks in advance for your help!

2 Likes

+1 for advice on cleanly evacuating a node.

There’s an evacuate command on the hosts (via the API). This should expel all the containers running on it. In 1.5.x, the host action menu should contain evacuate.

1 Like