<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-actually-happens-when-kubernetes-terminates-a-pod--img25ueae" -->

---
title: What Actually Happens When Kubernetes Terminates a Pod?
description: Explains the sequence Kubernetes follows when terminating a Pod: endpoint removal, SIGTERM signal, the preStop hook, the terminationGracePeriodSeconds window,...
canonical: https://daily.dev/posts/what-actually-happens-when-kubernetes-terminates-a-pod--img25ueae
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What Actually Happens When Kubernetes Terminates a Pod? | daily.dev
og:description: Explains the sequence Kubernetes follows when terminating a Pod: endpoint removal, SIGTERM signal, the preStop hook, the terminationGracePeriodSeconds window,...
og:url: https://daily.dev/posts/what-actually-happens-when-kubernetes-terminates-a-pod--img25ueae
og:image: https://api.daily.dev/og/posts/iMg25ueAE.png
og:image:alt: What Actually Happens When Kubernetes Terminates a Pod?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What Actually Happens When Kubernetes Terminates a Pod?

**[Kubernetes & Cloud Native Community](https://daily.dev/sources/kubernetescloudnativecommunity)** · [@divyansh30](https://daily.dev/divyansh30) · 1 min read · 9 upvotes · 2 comments

## Summary

Explains the sequence Kubernetes follows when terminating a Pod: endpoint removal, SIGTERM signal, the preStop hook, the terminationGracePeriodSeconds window, and finally SIGKILL. Understanding this order matters for achieving zero-downtime rolling deployments, scaling events, and Pod restarts, and the post ends by asking readers how they handle graceful termination in production.

## Content

A Pod being terminated doesn't simply mean Kubernetes immediately kills the container.

During graceful shutdown, Kubernetes gives the application time to stop accepting traffic, finish active requests, and clean up connections.

The important sequence is:

**Endpoint Removal → SIGTERM →** `preStop` **→** `terminationGracePeriodSeconds` **→ SIGKILL**

Understanding this lifecycle is important when handling **rolling deployments, scaling, and Pod restarts**.

[https://www.kubeblogs.com/ensuring-zero-downtime-a-guide-to-pod-termination-in-kubernetes/](https://www.kubeblogs.com/ensuring-zero-downtime-a-guide-to-pod-termination-in-kubernetes/)

**How do you handle graceful Pod termination in production?**

#Kubernetes #CloudNative #DevOps #SRE #Containers

## Community discussion

Top comments from developers on daily.dev.

**@nahum** · 1 upvotes

> The step nobody
>
> plans for is SIGKILL not working. Ours went to a gVisor sandbox whose kernel had stopped answering, and kubelet got DeadlineExceeded on the kill every 2 minutes, forever. The pod sat in Terminating for 90 minutes until we killed the sandbox by hand. Worth an alert on pods still Terminating long after their grace period. Full story: https://www.catchkill9.dev/posts/gvisor-one-lost-signal.html

**@pdfopsdev** · 0 upvotes

> the part people miss is SIGTERM can fire before endpoint removal actually propagates through kube-proxy/iptables, so you still get traffic mid-shutdown. a dumb sleep 5 in preStop fixes it more reliably than tuning terminationGracePeriodSeconds alone.

## Similar posts on daily.dev

- [A guide to restarting pods in Kubernetes using kubectl](https://daily.dev/posts/a-guide-to-restarting-pods-in-kubernetes-using-kubectl-vramfbhhs) · CNCF · 1 upvotes · 0 comments
- [Kubernetes Exit Codes Explained: 137, 139, 143 and How to Fix Them](https://daily.dev/posts/kubernetes-exit-codes-explained-137-139-143-and-how-to-fix-them-k9fnz7rnp) · Cast AI · 0 upvotes · 0 comments
- [When Kubernetes restarts your pod — And when it doesn’t](https://daily.dev/posts/when-kubernetes-restarts-your-pod-and-when-it-doesn-t-zhrxezkcv) · CNCF · 3 upvotes · 0 comments
- [Kubernetes Pod Troubleshooting: 5 Real Production Failures in 2026](https://daily.dev/posts/kubernetes-pod-troubleshooting-5-real-production-failures-in-2026-09hrifvf0) · Medium · 2 upvotes · 1 comments

---

Tags: [#kubernetes](https://daily.dev/tags/kubernetes), [#sre](https://daily.dev/tags/sre)

[View this post on daily.dev](https://daily.dev/posts/what-actually-happens-when-kubernetes-terminates-a-pod--img25ueae)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/what-actually-happens-when-kubernetes-terminates-a-pod--img25ueae","headline":"What Actually Happens When Kubernetes Terminates a Pod?","text":"Explains the sequence Kubernetes follows when terminating a Pod: endpoint removal, SIGTERM signal, the preStop hook, the terminationGracePeriodSeconds window, and finally SIGKILL. Understanding this order matters for achieving zero-downtime rolling deployments, scaling events, and Pod restarts, and the post ends by asking readers how they handle graceful termination in production.","url":"https://daily.dev/posts/what-actually-happens-when-kubernetes-terminates-a-pod--img25ueae","datePublished":"2026-09-30T05:07:08.569Z","dateModified":"2026-09-30T05:07:22.370Z","author":{"@type":"Person","name":"Divyansh","url":"https://daily.dev/divyansh30","image":"https://media.daily.dev/image/upload/s--f9lbkpFv--/f_auto/v1744873189/avatars/avatar_JMQ4qarKTe7zPurSPRrzM","description":"Aspiring engineer with an interest in AI, tech and DevOps :)","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":1000}},"image":"https://media.daily.dev/image/upload/s--jBnBHUjq--/f_auto/v1790744828/posts/iMg25ueAE?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"comment":[{"@type":"Comment","text":"The step nobody\nplans for is SIGKILL not working. Ours went to a gVisor sandbox whose kernel had stopped answering, and kubelet got DeadlineExceeded on the kill every 2 minutes, forever. The pod sat in Terminating for 90 minutes until we killed the sandbox by hand. Worth an alert on pods still Terminating long after their grace period. Full story: https://www.catchkill9.dev/posts/gvisor-one-lost-signal.html","datePublished":"2026-09-30T07:42:27.041Z","url":"https://daily.dev/posts/iMg25ueAE#c-vnHdN6b48","author":{"@type":"Person","name":"Nahum Litvin","url":"https://daily.dev/nahum","image":"https://lh3.googleusercontent.com/a-/AOh14GhvJ2y-9R45d5ee78ZdAo8l7J3t4G8fINkx5PEqBfA=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"the part people miss is SIGTERM can fire before endpoint removal actually propagates through kube-proxy/iptables, so you still get traffic mid-shutdown. a dumb sleep 5 in preStop fixes it more reliably than tuning terminationGracePeriodSeconds alone.","datePublished":"2026-09-30T18:08:15.468Z","url":"https://daily.dev/posts/iMg25ueAE#c-DqSTR2Nwa","author":{"@type":"Person","name":"PDFops","url":"https://daily.dev/pdfopsdev","image":"https://media.daily.dev/image/upload/s---8isRBKc--/f_auto/v1782922291/avatars/avatar_orjMeK8QKaaVZwGq7ScPz?_a=BAMAMicg0"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/kubernetescloudnativecommunity","name":"Kubernetes & Cloud Native Community"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Kubernetes & Cloud Native Community","item":"https://daily.dev/squads/kubernetescloudnativecommunity"},{"@type":"ListItem","position":3,"name":"What Actually Happens When Kubernetes Terminates a Pod?"}]}
```

