<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kubernetes on Daniel Corneschi</title><link>https://blog.corneschi.ro/tags/kubernetes/</link><description>Recent content in Kubernetes on Daniel Corneschi</description><generator>Hugo</generator><language>en</language><copyright>Daniel Corneschi</copyright><lastBuildDate>Mon, 12 Oct 2026 00:54:55 +0300</lastBuildDate><atom:link href="https://blog.corneschi.ro/tags/kubernetes/index.xml" rel="self" type="application/rss+xml"/><item><title>Kubernetes Pod Lifecycle Management</title><link>https://blog.corneschi.ro/posts/kubernetes-pod-lifecycle-management/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0300</pubDate><guid>https://blog.corneschi.ro/posts/kubernetes-pod-lifecycle-management/</guid><description>&lt;p&gt;A pod goes through four stages: it is &lt;strong&gt;deployed&lt;/strong&gt; (created and started), it &lt;strong&gt;runs&lt;/strong&gt; (kept healthy), it is &lt;strong&gt;updated&lt;/strong&gt; (replaced by a newer version), and finally it is &lt;strong&gt;deleted&lt;/strong&gt; (shut down gracefully). This article follows a pod through each stage and shows what Kubernetes does, and what you control, at every step.&lt;/p&gt;&#10;&lt;h2 id="key-takeaways"&gt;Key Takeaways&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A pod has only five &lt;strong&gt;phases&lt;/strong&gt;: &lt;code&gt;Pending&lt;/code&gt;, &lt;code&gt;Running&lt;/code&gt;, &lt;code&gt;Succeeded&lt;/code&gt;, &lt;code&gt;Failed&lt;/code&gt; and &lt;code&gt;Unknown&lt;/code&gt;. Everything else you see in &lt;code&gt;kubectl get pods&lt;/code&gt; (&lt;code&gt;ContainerCreating&lt;/code&gt;, &lt;code&gt;Init:0/1&lt;/code&gt;, &lt;code&gt;CrashLoopBackOff&lt;/code&gt;, &lt;code&gt;Terminating&lt;/code&gt;) is a container state or a kubectl status.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Probes&lt;/strong&gt; tell Kubernetes whether the app is really healthy: liveness restarts it, readiness takes it out of the Service, startup protects slow starters.&lt;/li&gt;&#10;&lt;li&gt;On deletion the app gets &lt;strong&gt;SIGTERM&lt;/strong&gt;, then a grace period (30 s by default), then &lt;strong&gt;SIGKILL&lt;/strong&gt;. Handle SIGTERM, and use a &lt;code&gt;preStop&lt;/code&gt; hook when the load balancer needs time to stop sending traffic.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Deployments&lt;/strong&gt; replace pods step by step; with readiness probes and &lt;code&gt;maxUnavailable: 0&lt;/code&gt;, an update doesn&amp;rsquo;t drop capacity.&lt;/li&gt;&#10;&lt;li&gt;Pick the &lt;strong&gt;restart policy&lt;/strong&gt; per workload: &lt;code&gt;Always&lt;/code&gt; for services, &lt;code&gt;OnFailure&lt;/code&gt; or &lt;code&gt;Never&lt;/code&gt; for Jobs.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="the-lifecycle-on-one-page"&gt;The Lifecycle on One Page&lt;/h2&gt;&#10;&lt;p&gt;The whole lifecycle in one picture. Its numbered panels match the sections below, which explain each step in detail with the YAML and the &lt;code&gt;kubectl&lt;/code&gt; commands to watch it happen. Click it to open it full size.&lt;/p&gt;</description></item></channel></rss>