Why are my Kubernetes pods stuck in Terminating state when the node is NotReady?

0
26
Asked By TechieGiraffe99 On

I'm experiencing an issue in my Kubernetes cluster where pods on a worker node stay stuck in the Terminating state when that node turns NotReady. Instead of Kubernetes automatically terminating and relocating these pods to other healthy nodes, I find myself having to manually force-delete them or sometimes even recreate the node to restore normal operations. This is particularly frustrating because I thought Kubernetes was designed to automatically handle node failures by evicting and rescheduling pods. Has anyone else dealt with this issue?

5 Answers

Answered By KernelPenguin72 On

Yeah, definitely look into the finalizers. Whenever I've faced similar problems, that was usually the culprit.

Answered By NetworkNinja22 On

What’s causing the node to go NotReady? Is it just a temporary state where you can still access the node, or is it completely unresponsive? Kubernetes usually moves workloads to other nodes if the node is unresponsive for about 5 minutes by default.

Answered By CloudyCoder19 On

A pod might get stuck in Terminating if the node goes offline and doesn’t confirm to the apiserver that the pod has stopped. Also, check the pod’s controller. If it’s managed by a Deployment, make sure its strategy isn’t set to “Recreate.” For StatefulSets, Kubernetes waits for termination confirmation before launching a new pod.

Answered By CuriousCrab84 On

You might want to check the finalizers on the pods. Sometimes a storage provisioner could be causing them to hang in the Terminating state.

Answered By TechyTurtle12 On

I faced this issue too. In my case, finalizers weren't the problem; it turned out one of my deployments was exhausting resources on the node, causing it to go down. That's when the pods became stuck at Terminating, and I saw a NotReady label on the node.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.