Member-only story

Getting rid of Kubernetes pods stuck on “Terminating”

Sébastien Dubois
1 min readMay 8, 2020

--

Here’s a really quick tip about an annoying Kubernetes issue I’ve encountered from time to time while updating my deployments.

Sometimes, for obscure reasons, pods get stuck in the “Terminating” state. There’s an open issue about this on Github.

It can apparently happen because of a lack of memory, timeouts, issues with volumes, etc. Since the issue is not resolved, there are only workarounds at this time.

The one that has worked for me is the following:

kubectl delete pods <pod> --grace-period=0 --force

This kills the problematic pods (pretty violently). Personally I only do this on my development workstation, so it’s all right. But be careful if you use this on a production system ;-)

--

--

Sébastien Dubois
Sébastien Dubois

Written by Sébastien Dubois

PKM Systems Architect Helping Knowledge Workers save 10+ hours/week 1K+ Happy customers ❤️ 🚀 https://developassion.gumroad.com 💌 https://dSebastien.net

No responses yet