A Node status NotReady
may leave Pods in Terminating
state indefinitely.
See Nodes.
The problem can usually be observed as follows:
NotReady
state.Terminating
status.Among the possible causes are:
Pods that are stuck in Terminating
won't be deleted automatically, if the Kubelet isn't working.
To forcefully remove all Pods of a Node, run:
kubectl delete pods --all-namespaces --field-selector spec.nodeName="${NAME_NAME}"
This will remove the Pods from the Kubernetes storage (etcd).
Containers belonging to these Pods will remain running on the broken Node.
Since the underlying machine will be deleted, this most likely won't matter though.
Make sure to adhere to the following best practices: