<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kubernetes Deep Dive]]></title><description><![CDATA[Kubernetes Deep Dive]]></description><link>https://kubernetes-deep-dive.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 31 Oct 2026 09:07:12 GMT</lastBuildDate><atom:link href="https://kubernetes-deep-dive.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A Step-by-Step Journey of Pod Creation in Kubernetes]]></title><description><![CDATA[You may run this command: But what actually happens after that? Your Request goes to the API Server, which is the front door of your cluster. The API…]]></description><link>https://kubernetes-deep-dive.hashnode.dev/a-step-by-step-journey-of-pod-creation-in-kubernetes</link><guid isPermaLink="true">https://kubernetes-deep-dive.hashnode.dev/a-step-by-step-journey-of-pod-creation-in-kubernetes</guid><dc:creator><![CDATA[dumpala Abhigna]]></dc:creator><pubDate>Fri, 10 Apr 2026 15:24:11 GMT</pubDate><content:encoded><![CDATA[<p>You may run this command:</p>
<pre><code class="language-bash">kubectl apply -f my-pod.yaml
</code></pre>
<p>But what actually happens after that?</p>
<h2>Step 1: Your YAML Hits the API Server  :</h2>
<p>Your Request goes to the <strong>API Server</strong>, which is the front door of your cluster.</p>
<p>The API Server:</p>
<p>Validates the YAML (checks syntax, required fields, etc.)Returns an error if anything is invalid</p>
<p>If valid, it moves forward</p>
<p>All requests in Kubernetes go through the API Server.</p>
<h2>Step 2: API Server Stores It in etcd</h2>
<p>Once validated, the API Server saves the <strong>desired state</strong> in the database(<strong>etcd</strong>):</p>
<p><em>"A Pod named my-pod should exist in the cluster."</em></p>
<p>That database is called <strong>etcd</strong> — it stores the entire state of your cluster.</p>
<ul>
<li><p>At this point:</p>
<ul>
<li><p>The Pod exists in the cluster state</p>
</li>
<li><p>But it has <strong>no node assigned yet</strong></p>
</li>
</ul>
</li>
</ul>
<p>Pod status:</p>
<pre><code class="language-plaintext">Pending
</code></pre>
<h2>Step 3: Controller Notices Something’s Missing</h2>
<p>The <strong>Controller Manager</strong> is always watching the cluster <a href="http://state.It">state</a></p>
<h3>it sees:</h3>
<p><em>“There’s a record in</em> <em><strong>etcd</strong></em> *saying this Pod should exist… but I don’t see it running.”*So, it triggers the next step: <strong>Pod scheduling</strong>.</p>
<h2>Step 4: Scheduler Picks the Best Node</h2>
<p>• The scheduler Evaluates:<br />– CPU / Memory<br />– Node labels &amp; affinity<br />– Taints &amp; tolerations</p>
<p>• Then it selects a best <strong>Worker Node</strong> and tells the <strong>API Server</strong> to bind the Pod to that Node.</p>
<p>⚠️ <strong>Remember</strong>: the Scheduler doesn’t create Pods — it just assigns them.</p>
<h2>Step 5: Kubelet on the Node Takes Over</h2>
<p>Each node has a <strong>kubelet</strong> that:<br />• Watches the API Server continuously<br />• Detects Pods assigned to its node</p>
<p>When detected, it:<br />• Pulls image (via container runtime like containerd)<br />• Creates containers<br />• Sets up networking<br />• Mounts volumes<br />• Starts the pod and monitors the health of the Pod</p>
<p>If anything goes wrong (e.g., image not found), <strong>the kubelet reports it</strong>.</p>
<p>💡 Important:<br />❌ API Server does NOT push instructions<br />✅ Kubelet <em>pulls</em> state from API Server</p>
<h2><strong>step 6: Pod Is Running!</strong></h2>
<p>Once everything is good:</p>
<p>Your Pod is marked as Running</p>
<p>You can see it with:</p>
<pre><code class="language-plaintext">$ kubectl get pods
</code></pre>
<p>here After a Pod is created, the <strong>kubelet</strong> on the assigned node continuously monitors it.</p>
<p>As the Pod’s state changes, the kubelet sends status updates to the <strong>Kubernetes API Server</strong>.</p>
<p>The <strong>API Server</strong> then stores that updated information in <strong>etcd</strong>, which is the cluster’s database.</p>
<hr />
<p>When you run:</p>
<pre><code class="language-plaintext">kubectl get pods
</code></pre>
<p>The request goes to the <strong>API Server</strong>.</p>
<p>The API Server:</p>
<ul>
<li><p>Reads the latest Pod state from <strong>etcd</strong></p>
</li>
<li><p>Returns that information back to <code>kubectl</code> (to you)</p>
</li>
</ul>
<hr />
<h3>Example Pod status updates include:</h3>
<ul>
<li><p><code>Pending</code></p>
</li>
<li><p><code>ContainerCreating</code></p>
</li>
<li><p><code>Running</code></p>
</li>
<li><p><code>CrashLoopBackOff</code></p>
</li>
<li><p><code>Failed</code></p>
</li>
</ul>
<hr />
<h3>Simplified Flow</h3>
<pre><code class="language-plaintext">kubelet → updates Pod status → API Server → stores in etcd

kubectl get pods → API Server → reads from etcd → shows output to you
</code></pre>
<p><strong>commands:</strong></p>
<pre><code class="language-plaintext">kubectl apply -f my-pod.yaml                 # Create the Pod
kubectl get pods                                    # See Pod status
kubectl describe pod my-pod                # View detailed events
kubectl get events --sort-by=.metadata.creationTimestamp
</code></pre>
]]></content:encoded></item></channel></rss>