Commands.app

kubectl drain

Node Management

Drain node for maintenance

Options & Flags
Available options for this command
--ignore-daemonsets

Ignore DaemonSet pods

--delete-emptydir-data

Delete emptyDir data

--force

Force drain

Examples
Common usage examples

Drain node safely

kubectl drain mynode --ignore-daemonsets

Drain including emptyDir pods

kubectl drain mynode --ignore-daemonsets --delete-emptydir-data
Notes
  • Evicts pods and cordons node
Related Commands
You might also find these useful