drain

Cordoning a node and then evicting its pods through the eviction API so it can be safely maintained or removed.

In more detail

Because drain uses eviction, it respects PodDisruptionBudgets and can pause when evicting another pod would break a budget. DaemonSet pods are skipped with --ignore-daemonsets, and pods using emptyDir need --delete-emptydir-data. Controllers recreate the evicted pods elsewhere.

Example

kubectl drain node-a --ignore-daemonsets

Related terms

Taught in

References

Certification courses