kubectl drain node-a --ignore-daemonsets

Category: Kubernetes & Containers

kubectl drain node-a --ignore-daemonsets

Evict pods from a node

Evicts every pod from node-a so the node can be rebooted or removed, keeping daemonset pods in place with --ignore-daemonsets. This is disruptive: it terminates workloads, so do it during maintenance windows. Add --delete-emptydir-data for pods using emptyDir volumes, and undo with kubectl uncordon node-a.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.