Kubernetes tip: Force delete terminating pod

How to get rid of pods that are stuck in the "Terminating" state

Kubernetes logo for a quick tip on force-deleting pods stuck in Terminating state

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 ;-)

That's it for today! ✨


Go Further

How to use a proxy to bypass firewalls in corporate environments
In medium to large companies, it’s almost always the case that your Web traffic has to go through a corporate proxy to reach the Web. Here’s how to find out more about those proxies and how to use them from your tools and terminals
Deploying TLS certificates for local development and production using Kubernetes, cert-manager, mkcert and Let’s Encrypt
How to deploy TLS certificates for local development and production using Kubernetes, cert-manager, mkcert and Let’s Encrypt
How to Stay on Top of Everything At Work
How to organize notes at work and never forget anything. Be on top of your game at work.

Want to go deeper?

Knowii Community - Master Knowledge Management + AI | From €4.99/month
Join 400+ members mastering Knowledge Management AND AI. Community + Courses + Tools integrated. €500+ value in Knowledge Master tier.

About Sébastien

I'm Sébastien Dubois, and I'm on a mission to help knowledge workers escape information overload. After 20+ years in IT and seeing too many brilliant minds drowning in digital chaos, I've decided to help people build systems that actually work. Through the Knowii Community, my courses, products & services and my Website/Newsletter, I share practical and battle-tested systems.

I write about Knowledge Work, Personal Knowledge Management, Note-taking, Lifelong Learning, Personal Organization, Productivity, and more. I also craft lovely digital products and tools.

If you want to follow my work, then become a member and join our community.

Ready to get to the next level?

If you're tired of information overwhelm and ready to build a reliable knowledge system:

Found this valuable? Share it with someone who needs it.

Join 6,000+ readers. Get practical systems for knowledge & AI. Free.

Subscribe ✨

Free: Knowledge System Checklist

A clear roadmap to building your own knowledge system. Subscribe and get it straight to your inbox.

6,000+ readers. No spam. Unsubscribe anytime.