kubectl drain

Evict pods from a node

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
kubectl drain <node> --ignore-daemonsets --dry-run=serverPreview first
kubectl get pdb -ACheck disruption budgets
What it does

Prepares a node for maintenance. See the flags and examples below, and run `man kubectl` for the full reference.

Common flags
FlagMeaning
--ignore-daemonsets --ignore-daemonsetsSkip DaemonSets
--delete-emptydir-data --delete-emptydir-dataDelete emptyDir data⚠ Local data is lost.
--force --forceEvict unmanaged pods⚠ Pods are deleted permanently.
--dry-run --dry-runPreview
--grace-period --grace-periodTermination grace
Examples
kubectl drain node1 --ignore-daemonsets --dry-run=serverPreview · explain & risk-check →
kubectl uncordon node1Allow scheduling again · explain & risk-check →
Related
kubectl cordon kubectl uncordon
Open the full explainer →More in Kubernetes & Helm

Reference text is hand-written and may be incomplete — check man kubectl for your version. Test destructive commands on a non-production system first.