Cordon a node
Marks a node unschedulable; running pods stay where they are.
kubectl cordon <node-name>
A node stops reporting, or you need to take one out for maintenance without dropping traffic. All playbooks.
List nodes with their status, version and IP addresses.
kubectl get nodes -o wide
Check the node's conditions (MemoryPressure, DiskPressure, PIDPressure, Ready) and recent events.
kubectl describe node <node-name>
Stop new pods landing on it.
Marks a node unschedulable; running pods stay where they are.
kubectl cordon <node-name>
Move its pods elsewhere. PodDisruptionBudgets can make this wait; that is them doing their job.
Cordons the node and evicts its pods before maintenance, respecting PodDisruptionBudgets.
Caution. --delete-emptydir-data deletes the data in emptyDir volumes on that node.
kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-data
With Karpenter, delete the node's NodeClaim instead: Karpenter drains the node and provisions a replacement.
kubectl delete nodeclaim <nodeclaim-name>
Watch the replacement come up.
Streams NodeClaim changes as Karpenter provisions and consolidates nodes.
kubectl get nodeclaims -w