FahamLah

Commands

kubectl drain

kubectl drain <node> --ignore-daemonsets [--delete-emptydir-data]

Risk: Can lose work

What it does

Cordons a node and evicts its pods. emptyDir data is lost.

When to use it

Before you upgrade or remove a node.

Example

$ kubectl drain dev-worker --ignore-daemonsets

Move every tray off this stall.