skip to content
Alvin Lucillo

Unable to drain node

/ 1 min read

The error below when draining a node is due to a pod not being managed by a controller like replicaset. When you drain a node, the pods are evicted and recreated in another available node. However, that is not possible if a pod has no controller. If you use --force, the pod will be evicted and won’t be recreated in another node.

k drain node01 --ignore-daemonsets
node/node01 cordoned
error: unable to drain node "node01" due to error: cannot delete cannot delete Pods that declare no controller (use --force to override): default/app1, continuing command...
There are pending nodes to be drained:
 node01
cannot delete cannot delete Pods that declare no controller (use --force to override): default/app1