Evict workloads before maintenance or replacement.

Section: Scheduling and Maintenance

Drain a node

bash
bash
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Scheduling and Maintenance
Cordon a node
Prevent new pods from being scheduled onto a node.
OpenIn sheetbashsame section
Uncordon a node
Return a node to normal scheduling.
OpenIn sheetbashsame section
List pods on a specific node
See which workloads are affected by a node problem.
OpenIn sheetbashsame section
List DaemonSets
Verify whether node-level agents are missing or unhealthy.
OpenIn sheetbashsame section
List nodes
Start by verifying Ready status across the cluster.
Open a debug shell on a node
Create a privileged debug pod on the node for investigation.