skip to content
Alvin Lucillo

Cordon vs drain

/ 1 min read

k cordon node01 marks node as unschedulable, meaning no new pods will be scheduled in the node, while k drain node01 will do the same but evict existing pods and recreate them to another available node. To make the node scheduleable again, use k uncordon node01.

k drain node01
node/node01 already cordoned
evicting pod default/blue-69968556cc-tmfjt
evicting pod default/blue-69968556cc-g6r67
pod/blue-69968556cc-tmfjt evicted
pod/blue-69968556cc-g6r67 evicted
node/node01 drained

k get nodes
node01         Ready,SchedulingDisabled   <none>          8m27s   v1.32.0