<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shiva Krishna beepeta</title>
    <description>The latest articles on DEV Community by Shiva Krishna beepeta (@shiva_beepeta).</description>
    <link>https://dev.to/shiva_beepeta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3344616%2F48e6e622-fcd6-4fd9-ad5f-41bbe69c818b.png</url>
      <title>DEV Community: Shiva Krishna beepeta</title>
      <link>https://dev.to/shiva_beepeta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shiva_beepeta"/>
    <language>en</language>
    <item>
      <title>Kubernetes Series - Part 2: Container vs Pod vs Deployment Explained</title>
      <dc:creator>Shiva Krishna beepeta</dc:creator>
      <pubDate>Fri, 25 Sep 2026 16:53:56 +0000</pubDate>
      <link>https://dev.to/shiva_beepeta/kubernetes-series-part-2-container-vs-pod-vs-deployment-explained-2m7c</link>
      <guid>https://dev.to/shiva_beepeta/kubernetes-series-part-2-container-vs-pod-vs-deployment-explained-2m7c</guid>
      <description>&lt;h1&gt;
  
  
  Kubernetes Series - Part 2: Container vs Pod vs Deployment Explained
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;In the previous article, we explored Kubernetes Architecture and how different components interact inside a cluster.&lt;/p&gt;

&lt;p&gt;In this article, we'll dive into one of the most fundamental Kubernetes concepts:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Container → Pod → Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Understanding these three concepts is critical because almost every Kubernetes workload is built on top of them.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Why Do We Need Container, Pod and Deployment?
&lt;/h1&gt;

&lt;p&gt;A common misconception among beginners is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Aren't Container, Pod, and Deployment all used to run applications?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The answer is &lt;strong&gt;Yes&lt;/strong&gt;, but each solves a different problem.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Container&lt;/td&gt;
&lt;td&gt;Runs the application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pod&lt;/td&gt;
&lt;td&gt;Hosts and groups containers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Manages and maintains Pods&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Think of it like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application
    ↓
Container
    ↓
Pod
    ↓
Deployment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each layer adds new capabilities.&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 1: Understanding Containers
&lt;/h1&gt;

&lt;p&gt;A Container is the actual instance of your application.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This launches an Nginx container.&lt;/p&gt;

&lt;p&gt;A container includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application code&lt;/li&gt;
&lt;li&gt;Runtime environment&lt;/li&gt;
&lt;li&gt;Libraries&lt;/li&gt;
&lt;li&gt;Dependencies&lt;/li&gt;
&lt;li&gt;Configuration&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Real-World Example
&lt;/h2&gt;

&lt;p&gt;Imagine you have a Java application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Java Application
       │
       ▼
Docker Image
       │
       ▼
Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The container contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JDK
+
Application JAR
+
Required Libraries
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything needed to run the application travels together.&lt;/p&gt;

&lt;p&gt;This is why containers work consistently across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local Laptop&lt;/li&gt;
&lt;li&gt;QA Environment&lt;/li&gt;
&lt;li&gt;Staging&lt;/li&gt;
&lt;li&gt;Production&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Problem With Using Only Containers
&lt;/h2&gt;

&lt;p&gt;Suppose your container crashes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Container
    ↓
Crash
    ↓
Application Down
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Questions arise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who recreates the container?&lt;/li&gt;
&lt;li&gt;Who scales containers?&lt;/li&gt;
&lt;li&gt;Who updates them?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A standalone container cannot solve these problems.&lt;/p&gt;

&lt;p&gt;This is where Kubernetes enters the picture.&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 2: Understanding Pods
&lt;/h1&gt;

&lt;p&gt;Kubernetes doesn't directly manage containers.&lt;/p&gt;

&lt;p&gt;Instead, Kubernetes runs containers inside &lt;strong&gt;Pods&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is a Pod?
&lt;/h2&gt;

&lt;p&gt;A Pod is the &lt;strong&gt;smallest deployable unit in Kubernetes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A Pod can contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Multiple Containers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Single Container Pod
&lt;/h3&gt;

&lt;p&gt;Most common scenario:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod
 │
 └── Nginx Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Multi-Container Pod
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod
 │
 ├── Application Container
 │
 └── Log Forwarder Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application Container
       +
Fluent Bit Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Fluent Bit sidecar collects logs generated by the application.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Do Containers Need Pods?
&lt;/h1&gt;

&lt;p&gt;Pods provide three important capabilities.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Shared Network
&lt;/h2&gt;

&lt;p&gt;Every Pod gets a unique IP.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod IP = 10.244.1.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All containers inside that Pod share the same IP.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application Container
Logging Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;can communicate using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;localhost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. Shared Storage
&lt;/h2&gt;

&lt;p&gt;Containers inside the same Pod can access common storage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application writes logs
        ↓
Shared Volume
        ↓
Log Collector reads logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Shared Lifecycle
&lt;/h2&gt;

&lt;p&gt;Containers inside a Pod:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start together&lt;/li&gt;
&lt;li&gt;Stop together&lt;/li&gt;
&lt;li&gt;Get scheduled together&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Kubernetes treats them as a single unit.&lt;/p&gt;




&lt;h1&gt;
  
  
  Life of a Pod
&lt;/h1&gt;

&lt;p&gt;Let's say Kubernetes creates a Pod.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod Created
      ↓
Container Starts
      ↓
Application Running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything works fine.&lt;/p&gt;

&lt;p&gt;Suddenly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Node Failure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application Crash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod Lost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now what?&lt;/p&gt;




&lt;h1&gt;
  
  
  Problem With Pods
&lt;/h1&gt;

&lt;p&gt;Pods are temporary.&lt;/p&gt;

&lt;p&gt;They are designed to be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Created&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Destroyed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recreated&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A standalone Pod does not automatically recreate itself.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl delete pod nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod Deleted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No automatic recovery.&lt;/p&gt;

&lt;p&gt;Application becomes unavailable.&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 3: Understanding Deployments
&lt;/h1&gt;

&lt;p&gt;This is where Deployments become important.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is a Deployment?
&lt;/h2&gt;

&lt;p&gt;A Deployment is a Kubernetes controller that manages Pods.&lt;/p&gt;

&lt;p&gt;Instead of creating Pods directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pod&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Deployment Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Deployment
     │
     ▼
ReplicaSet
     │
     ▼
Pods
     │
     ▼
Containers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Why Do We Need Deployments?
&lt;/h1&gt;

&lt;p&gt;Deployments solve four major problems:&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-Healing
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Scaling
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Rolling Updates
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Rollbacks
&lt;/h2&gt;




&lt;h1&gt;
  
  
  1. Self-Healing
&lt;/h1&gt;

&lt;p&gt;Deployment maintains a desired state.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Desired state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 Pods Running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Current state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod-1
Pod-2
Pod-3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pod-2 crashes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod-2 Down
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deployment detects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Desired = 3
Actual  = 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Immediately creates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New Pod-2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Final state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod-1
Pod-2
Pod-3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This feature is called &lt;strong&gt;Self-Healing&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Scaling
&lt;/h1&gt;

&lt;p&gt;Traffic increases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100 Users
    ↓
10,000 Users
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need more application instances.&lt;/p&gt;

&lt;p&gt;Update:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl scale deployment nginx &lt;span class="nt"&gt;--replicas&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deployment creates additional Pods automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod-1
Pod-2
...
Pod-10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  3. Rolling Updates
&lt;/h1&gt;

&lt;p&gt;Current Application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;New Release:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v2.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without Deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stop Everything
Deploy New Version
Start Everything
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Downtime occurs.&lt;/p&gt;




&lt;p&gt;With Deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create New Pod
      ↓
Verify Health
      ↓
Remove Old Pod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repeat until every Pod is updated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;No Downtime
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  4. Rollback
&lt;/h1&gt;

&lt;p&gt;New release causes issues.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v2.0
  ↓
Application Failure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deployment allows rollback.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl rollout undo deployment/nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kubernetes restores the previous working version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v1.0 Restored
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  The Complete Picture
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Deployment
│
├── Maintains Desired State
├── Performs Scaling
├── Handles Updates
├── Provides Rollback
└── Creates Pods
        │
        ▼
       Pod
        │
        ├── Shared Network
        ├── Shared Storage
        └── Shared Lifecycle
                │
                ▼
           Container
                │
                └── Runs Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Real Production Example
&lt;/h1&gt;

&lt;p&gt;Consider an e-commerce application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Container
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Spring Boot Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;runs inside:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Pod
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod
├── Spring Boot Container
└── FluentBit Container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both share:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storage&lt;/li&gt;
&lt;li&gt;Network&lt;/li&gt;
&lt;li&gt;Lifecycle&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Deployment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ensures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 Healthy Pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;always remain available.&lt;/p&gt;

&lt;p&gt;If one Pod crashes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Automatically Recreated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If traffic spikes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scale to 10 Pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If deployment fails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rollback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Interview Question
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Why are Deployments preferred over Pods in production?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pods only run containers and provide a shared execution environment. They do not offer self-healing, scaling, rolling updates, or rollback capabilities. Deployments manage Pods and maintain the desired state of the application, making them the preferred choice for production workloads.&lt;/p&gt;




&lt;h1&gt;
  
  
  Quick Comparison
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Container&lt;/th&gt;
&lt;th&gt;Pod&lt;/th&gt;
&lt;th&gt;Deployment&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Runs Application&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Indirectly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Smallest Kubernetes Object&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contains Multiple Containers&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shared Network&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shared Storage&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-Healing&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scaling&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rolling Update&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rollback&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production Ready&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Rarely&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Key Takeaway
&lt;/h1&gt;

&lt;p&gt;Remember this simple statement:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Containers run applications, Pods host containers, and Deployments manage Pods.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or even simpler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Container  = Application
Pod        = Home for Containers
Deployment = Pod Manager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you understand this hierarchy, concepts like Services, Ingress, HPA, StatefulSets, DaemonSets, and Argo CD become much easier to understand.&lt;/p&gt;




&lt;h1&gt;
  
  
  Kubernetes #DevOps #CloudNative #Containers #Docker #K8s #SRE #PlatformEngineering #ArgoCD #LearningInPublic
&lt;/h1&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>containers</category>
      <category>docker</category>
    </item>
    <item>
      <title>Kubernetes Architecture</title>
      <dc:creator>Shiva Krishna beepeta</dc:creator>
      <pubDate>Thu, 24 Sep 2026 08:05:27 +0000</pubDate>
      <link>https://dev.to/shiva_beepeta/kubernetes-architecture-38bo</link>
      <guid>https://dev.to/shiva_beepeta/kubernetes-architecture-38bo</guid>
      <description>&lt;h1&gt;
  
  
  🚀 Kubernetes Architecture Explained
&lt;/h1&gt;

&lt;p&gt;Before diving into Kubernetes architecture, let's first understand why Kubernetes is preferred for running containerized applications in production environments.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Kubernetes Is Preferred Over Docker
&lt;/h1&gt;

&lt;p&gt;Docker is a containerization platform that helps package and run applications inside containers. However, managing hundreds or thousands of containers across multiple servers becomes difficult.&lt;/p&gt;

&lt;p&gt;This is where Kubernetes comes into the picture.&lt;/p&gt;

&lt;p&gt;Kubernetes is a &lt;strong&gt;container orchestration platform&lt;/strong&gt; that automates the deployment, scaling, networking, and management of containerized applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Benefits of Kubernetes
&lt;/h2&gt;

&lt;p&gt;✅ &lt;strong&gt;Cluster-Level Management&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Manage containers across multiple servers (nodes) from a single control plane.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Auto Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Automatically increase or decrease application replicas based on workload demand.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Self-Healing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Automatically recreate failed Pods and maintain the desired state.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Enterprise-Grade Platform&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Provides high availability, scalability, security, and strong community support.&lt;/p&gt;




&lt;h1&gt;
  
  
  Kubernetes Architecture
&lt;/h1&gt;

&lt;p&gt;A Kubernetes cluster consists of two major parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Control Plane (Master Node)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worker Nodes&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  Control Plane
                         |
    ------------------------------------------------
    |                  |                  |
 API Server       Scheduler      Controller Manager
                         |
                       etcd
                         |
--------------------------------------------------------
|                    |                    |
Worker Node 1   Worker Node 2     Worker Node 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Worker Node Components
&lt;/h1&gt;

&lt;p&gt;Worker Nodes are responsible for running application workloads.&lt;/p&gt;

&lt;p&gt;The major components of a Worker Node are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pod&lt;/li&gt;
&lt;li&gt;Kubelet&lt;/li&gt;
&lt;li&gt;Kube-Proxy&lt;/li&gt;
&lt;li&gt;Container Runtime&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Pod
&lt;/h1&gt;

&lt;p&gt;A &lt;strong&gt;Pod&lt;/strong&gt; is the smallest deployable unit in Kubernetes.&lt;/p&gt;

&lt;p&gt;A Pod can contain one or more tightly coupled containers that share:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Network&lt;/li&gt;
&lt;li&gt;Storage&lt;/li&gt;
&lt;li&gt;Lifecycle&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Characteristics
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pods are &lt;strong&gt;ephemeral&lt;/strong&gt; in nature.&lt;/li&gt;
&lt;li&gt;If a Pod crashes, Kubernetes replaces it with a new identical Pod.&lt;/li&gt;
&lt;li&gt;Pods are usually managed through a Deployment resource.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pod Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pod
 ├── Application Container
 └── Sidecar Container (Optional)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why Pods?
&lt;/h3&gt;

&lt;p&gt;Pods provide an abstraction layer over containers and allow Kubernetes to manage applications more effectively.&lt;/p&gt;




&lt;h1&gt;
  
  
  Kubelet
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Kubelet&lt;/strong&gt; is an agent that runs on every Worker Node.&lt;/p&gt;

&lt;p&gt;Its primary responsibility is to ensure that containers are running according to the specifications defined in Kubernetes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Responsibilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Receives instructions from the API Server.&lt;/li&gt;
&lt;li&gt;Creates and manages Pods.&lt;/li&gt;
&lt;li&gt;Monitors Pod health and status.&lt;/li&gt;
&lt;li&gt;Mounts storage volumes.&lt;/li&gt;
&lt;li&gt;Reports the status of Pods and Nodes back to the Control Plane.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Kubelet Workflow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;API Server
      |
      v
   Kubelet
      |
      v
     Pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Think of Kubelet as the &lt;strong&gt;node manager&lt;/strong&gt; that continuously monitors workloads running on a node.&lt;/p&gt;




&lt;h1&gt;
  
  
  Kube-Proxy
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Kube-Proxy&lt;/strong&gt; is responsible for networking and traffic routing inside the Kubernetes cluster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Responsibilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Maintains networking rules on each node.&lt;/li&gt;
&lt;li&gt;Routes traffic to the correct Pod.&lt;/li&gt;
&lt;li&gt;Enables Service-to-Pod communication.&lt;/li&gt;
&lt;li&gt;Performs load balancing across Pod replicas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Traffic Flow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client Request
       |
       v
    Service
       |
       v
  Kube-Proxy
       |
 ------------------
 |       |        |
Pod-1   Pod-2   Pod-3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without Kube-Proxy, Services would not be able to route requests to application Pods.&lt;/p&gt;




&lt;h1&gt;
  
  
  Container Runtime
&lt;/h1&gt;

&lt;p&gt;The &lt;strong&gt;Container Runtime&lt;/strong&gt; is responsible for running containers on Worker Nodes.&lt;/p&gt;

&lt;p&gt;Popular container runtimes include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;containerd&lt;/li&gt;
&lt;li&gt;CRI-O&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Responsibilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pulling container images.&lt;/li&gt;
&lt;li&gt;Creating containers.&lt;/li&gt;
&lt;li&gt;Starting and stopping containers.&lt;/li&gt;
&lt;li&gt;Managing container lifecycle operations.&lt;/li&gt;
&lt;li&gt;Collecting and exposing container logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Runtime Flow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Container Image
        |
        v
Container Runtime
        |
        v
Container Creation
        |
        v
Application Running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Control Plane Components
&lt;/h1&gt;

&lt;p&gt;The Control Plane acts as the brain of the Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;It is responsible for making decisions about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scheduling&lt;/li&gt;
&lt;li&gt;Scaling&lt;/li&gt;
&lt;li&gt;Cluster management&lt;/li&gt;
&lt;li&gt;Recovery from failures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Control Plane consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API Server&lt;/li&gt;
&lt;li&gt;Scheduler&lt;/li&gt;
&lt;li&gt;etcd&lt;/li&gt;
&lt;li&gt;Controller Manager&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  API Server
&lt;/h1&gt;

&lt;p&gt;The &lt;strong&gt;API Server&lt;/strong&gt; is the entry point to the Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;Every component communicates through the API Server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Responsibilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Handles all Kubernetes API requests.&lt;/li&gt;
&lt;li&gt;Authenticates and authorizes users.&lt;/li&gt;
&lt;li&gt;Validates configuration changes.&lt;/li&gt;
&lt;li&gt;Updates cluster state.&lt;/li&gt;
&lt;li&gt;Communicates with other Control Plane components.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;When you execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The request first reaches the API Server, which retrieves the information and returns the response.&lt;/p&gt;

&lt;h3&gt;
  
  
  Flow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl
    |
    v
API Server
    |
    v
Cluster Components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Think of the API Server as the &lt;strong&gt;central communication hub&lt;/strong&gt; of Kubernetes.&lt;/p&gt;




&lt;h1&gt;
  
  
  Scheduler
&lt;/h1&gt;

&lt;p&gt;The &lt;strong&gt;Scheduler&lt;/strong&gt; decides where newly created Pods should be placed.&lt;/p&gt;

&lt;p&gt;Whenever a new Pod is created, the Scheduler identifies the most suitable Worker Node.&lt;/p&gt;

&lt;h2&gt;
  
  
  Factors Considered
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CPU availability&lt;/li&gt;
&lt;li&gt;Memory availability&lt;/li&gt;
&lt;li&gt;Node affinity&lt;/li&gt;
&lt;li&gt;Taints and tolerations&lt;/li&gt;
&lt;li&gt;Resource requests and limits&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Scheduling Process
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New Pod Created
        |
        v
    Scheduler
        |
        v
Select Best Node
        |
        v
     Worker Node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Scheduler ensures workloads are distributed efficiently across the cluster.&lt;/p&gt;




&lt;h1&gt;
  
  
  etcd
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;etcd&lt;/strong&gt; is a distributed key-value database used by Kubernetes.&lt;/p&gt;

&lt;p&gt;It stores the complete state and configuration of the cluster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples of Data Stored in etcd
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pods&lt;/li&gt;
&lt;li&gt;Services&lt;/li&gt;
&lt;li&gt;Deployments&lt;/li&gt;
&lt;li&gt;ConfigMaps&lt;/li&gt;
&lt;li&gt;Secrets&lt;/li&gt;
&lt;li&gt;Nodes&lt;/li&gt;
&lt;li&gt;Cluster configurations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;etcd
 ├── Pods
 ├── Services
 ├── ConfigMaps
 ├── Secrets
 ├── Deployments
 └── Nodes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Think of &lt;strong&gt;etcd&lt;/strong&gt; as the &lt;strong&gt;single source of truth&lt;/strong&gt; for the Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;If etcd becomes unavailable, the Control Plane cannot function correctly.&lt;/p&gt;




&lt;h1&gt;
  
  
  Controller Manager
&lt;/h1&gt;

&lt;p&gt;The &lt;strong&gt;Controller Manager&lt;/strong&gt; runs multiple controllers responsible for maintaining the desired cluster state.&lt;/p&gt;

&lt;p&gt;Its main job is to continuously compare:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Desired State
      VS
Actual State
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and take corrective actions whenever there is a mismatch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;Desired State:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 Pods Running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Current State:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 Pods Running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Action Taken:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Controller Manager
        |
        v
Create New Pod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cluster automatically returns to the desired state of three running Pods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Responsibilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Replica management&lt;/li&gt;
&lt;li&gt;Node management&lt;/li&gt;
&lt;li&gt;Endpoint management&lt;/li&gt;
&lt;li&gt;Pod lifecycle management&lt;/li&gt;
&lt;li&gt;Self-healing operations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This continuous reconciliation process is one of the core strengths of Kubernetes.&lt;/p&gt;




&lt;h1&gt;
  
  
  Putting It All Together
&lt;/h1&gt;

&lt;p&gt;Let's see how all components work together when a Pod is created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Developer
    |
kubectl apply
    |
    v
API Server
    |
    v
Scheduler
    |
Select Node
    |
    v
Kubelet
    |
Create Pod
    |
    v
Container Runtime
    |
Run Containers
    |
    v
Kube-Proxy
    |
Expose Application Traffic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Kubernetes follows a powerful architecture that enables organizations to run applications reliably at scale.&lt;/p&gt;

&lt;h3&gt;
  
  
  Worker Node Components
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Pod runs application containers.&lt;/li&gt;
&lt;li&gt;Kubelet manages Pods on a node.&lt;/li&gt;
&lt;li&gt;Kube-Proxy handles networking.&lt;/li&gt;
&lt;li&gt;Container Runtime runs containers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Control Plane Components
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;API Server acts as the communication hub.&lt;/li&gt;
&lt;li&gt;Scheduler places workloads on the best node.&lt;/li&gt;
&lt;li&gt;etcd stores cluster state.&lt;/li&gt;
&lt;li&gt;Controller Manager ensures the desired state is maintained.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, these components provide:&lt;/p&gt;

&lt;p&gt;✅ High Availability&lt;/p&gt;

&lt;p&gt;✅ Scalability&lt;/p&gt;

&lt;p&gt;✅ Self-Healing&lt;/p&gt;

&lt;p&gt;✅ Efficient Resource Utilization&lt;/p&gt;

&lt;p&gt;✅ Enterprise-Grade Reliability&lt;/p&gt;

&lt;p&gt;This is the reason Kubernetes has become the de facto standard for managing containerized workloads in modern cloud-native environments.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Next Article
&lt;/h2&gt;

&lt;p&gt;In the next article, we'll dive deeper into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pods vs Deployments&lt;/li&gt;
&lt;li&gt;ReplicaSets&lt;/li&gt;
&lt;li&gt;Services&lt;/li&gt;
&lt;li&gt;Ingress&lt;/li&gt;
&lt;li&gt;ConfigMaps &amp;amp; Secrets&lt;/li&gt;
&lt;li&gt;Persistent Volumes&lt;/li&gt;
&lt;li&gt;Kubernetes Networking&lt;/li&gt;
&lt;li&gt;Kubernetes Troubleshooting
``&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>containers</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Beyond Basics: Unlock the power of Advanced linux commands</title>
      <dc:creator>Shiva Krishna beepeta</dc:creator>
      <pubDate>Thu, 17 Jul 2025 05:32:33 +0000</pubDate>
      <link>https://dev.to/shiva_beepeta/beyond-basics-unlock-the-power-of-advanced-linux-commands-1mk4</link>
      <guid>https://dev.to/shiva_beepeta/beyond-basics-unlock-the-power-of-advanced-linux-commands-1mk4</guid>
      <description>&lt;p&gt;🚀 Advanced Linux Commands Every Power User Should Know&lt;/p&gt;

&lt;p&gt;Intro:&lt;/p&gt;

&lt;p&gt;Linux is powerful, and once you move beyond the basics, a whole new world of productivity opens up. This post dives into advanced Linux commands and pro tips to help you work faster, smarter, and more efficiently on the terminal.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 1. awk — Text Processing and Reporting
&lt;/h2&gt;

&lt;p&gt;Awk is a scripting language used for manipulating data and generating reports. The awk command programming language requires no compiling and allows the user to use variables, numeric functions, string functions, and logical operators.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;awk '{print $1, $3}' file.txt
awk options 'selection _criteria {action }' input-file &amp;gt; output-file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Flags/options with awk command:-&lt;/p&gt;

&lt;p&gt;-F        Sets a custom field separator&lt;br&gt;
-f        Reads awk program from a file&lt;br&gt;
'{}'          Encloses action to take on match&lt;/p&gt;

&lt;p&gt;Use Case: Extract specific columns from structured files.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔹 2. sed — Stream Editor for Modifying Files
&lt;/h2&gt;

&lt;p&gt;The SED command (short for Stream Editor) is one of the most powerful tools for text processing in Linux and Unix systems. It's commonly used for tasks like search and replace, text transformation, and stream editing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The basic syntax for using the SED command in Linux is:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sed [OPTIONS] 'COMMAND' [INPUTFILE...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where,&lt;/p&gt;

&lt;p&gt;'OPTIONS': These are optional flags that modify the behaviour of the sed command.&lt;br&gt;
'COMMAND': This defines the command or sequence of commands to execute on the input file.&lt;br&gt;
'INPUTFILE': One or more input files to be processed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EXAMPLE:-&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sed 's/unix/linux/' geekfile.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the "s" specifies the substitution operation. The "/" are delimiters. The "unix" is the search pattern and the "linux" is the replacement string. By default, the sed command replaces the first occurrence of the pattern in each line and it won't replace the second, third...occurrence in the line.&lt;/p&gt;

&lt;p&gt;To replace only the nth occurance of a word in a line, use the following syntax:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt;  sed 's/old_word/new_word/n' filename&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Use Case: Find and replace text in-place across files.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔹 3. strace — Trace System Calls
&lt;/h2&gt;

&lt;p&gt;'strace' is a powerful tool for monitoring and diagnosing processes in Linux. It is primarily used for debugging programs, troubleshooting issues, intercepting and recording system calls, and tracing running processes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;strace -p &amp;lt;PID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use Case: Debug processes or binaries by inspecting their system calls.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 4. lsof — List Open Files
&lt;/h2&gt;

&lt;p&gt;In the world of Linux, understanding and managing open files is crucial for system administrators and users alike. The Linux operating system provides a powerful utility called lsof (List Open Files) that allows users to gain insights into the files currently open on their system&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lsof
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use Case: Identify which process is using a port or file.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 5. watch — Repeat Commands Every N Seconds
&lt;/h2&gt;

&lt;p&gt;The 'watch' command in Linux is a powerful utility that allows you to execute a command periodically, displaying its output in fullscreen mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;watch -n 2 df -h

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use Case: Monitor disk usage or other outputs in real-time.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 6. rsync — Efficient File Transfer
&lt;/h2&gt;

&lt;p&gt;rsync or remote synchronization is a software utility for Unix-Like systems that efficiently sync files and directories between two hosts or machines.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rsync -avz /src/ user@host:/dest/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use Case: Fast, incremental backups or file transfers.&lt;/p&gt;




&lt;p&gt;🧠 Bonus Tips:&lt;/p&gt;

&lt;p&gt;Use alias to speed up repeated commands.&lt;/p&gt;

&lt;p&gt;Combine find, xargs, and grep for powerful one-liners.&lt;/p&gt;

&lt;p&gt;Learn bash functions to automate routine terminal tasks.&lt;/p&gt;




&lt;p&gt;📌 Final Thoughts&lt;/p&gt;

&lt;p&gt;Mastering these commands can dramatically improve your Linux workflow. Whether you're managing servers, writing scripts, or troubleshooting systems, these tools give you the power and flexibility that make Linux truly shine.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>learning</category>
      <category>devops</category>
      <category>devto</category>
    </item>
    <item>
      <title>Linux cheat sheet for day-to-day actions...!!!</title>
      <dc:creator>Shiva Krishna beepeta</dc:creator>
      <pubDate>Sun, 13 Jul 2025 10:06:38 +0000</pubDate>
      <link>https://dev.to/shiva_beepeta/linux-cheat-sheet-for-day-to-day-actions-5507</link>
      <guid>https://dev.to/shiva_beepeta/linux-cheat-sheet-for-day-to-day-actions-5507</guid>
      <description>&lt;p&gt;Linux is a powerful operating system that become much more manageable when you know your way around the terminal. This cheat sheet will make your day-to-day easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Files &amp;amp; Dir Navigation:-&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;pwd&lt;/strong&gt;     -    prints current working directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ls&lt;/strong&gt;      -    list all files and directories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cd&lt;/strong&gt;      -    change directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mkdir&lt;/strong&gt;   -    create directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rmdir&lt;/strong&gt;   -    remove directory&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;File Operations:-&lt;/strong&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;touch filename&lt;/strong&gt;   - create empty file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cp file1 file2&lt;/strong&gt;   - copy file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mv old new&lt;/strong&gt;       - move or rename.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rm file&lt;/strong&gt;          - delete file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cat file&lt;/strong&gt;         - view the content of file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;less file&lt;/strong&gt;        - view file one page at a time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;head -n 10  file&lt;/strong&gt; - show first 10 lines. modify 10 in command to get required number of lines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tail -n 10 file&lt;/strong&gt;  - show last 10 lines.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Search &amp;amp; Filter:-&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;find . -name ".txt"&lt;/strong&gt;     - find files by name&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grep "Word" filename&lt;/strong&gt;    - search for the key word in a file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grep -r "word" dir/&lt;/strong&gt;     - search recursively for a word in directory&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;System Info and Monitoring:-&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;uname -a&lt;/strong&gt;             - kernel and system info&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;df -h&lt;/strong&gt;                - disk space usage&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;du -sh * *&lt;/em&gt;            - directory size summary&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;top&lt;/strong&gt;                  - live process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;free -h&lt;/strong&gt;              - memory usage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;uptime&lt;/strong&gt;               - system running time&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Networking commands:-&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ip -a&lt;/strong&gt;                    - show ip address&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ping 0.0.0.0&lt;/strong&gt;             - pings the ip address&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;curl &lt;a href="https://sample.com" rel="noopener noreferrer"&gt;https://sample.com&lt;/a&gt;&lt;/strong&gt;  - make http requests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;wget URL&lt;/strong&gt;                 - downloads files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;netstat -tunlp&lt;/strong&gt;           - show open ports and services&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ss -tunl&lt;/strong&gt;                 - display listening ports&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;This linux cheat sheet is a starting point, but real understanding comes from practice. bookmark this page or print out and stick at your desk. stay tuned for more information.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>learning</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
