<?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 Architecture]]></title><description><![CDATA[Kubernetes Architecture]]></description><link>https://kubernetesarchitectur.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 03:22:23 GMT</lastBuildDate><atom:link href="https://kubernetesarchitectur.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[What is Kubernetes? Key Features, Architecture, and Why It Matters in Modern DevOps]]></title><description><![CDATA[Introduction
In the world of modern software development, containers have revolutionized how we package and ship applications. However, managing containers manually—especially at scale—can become complex, error-prone, and time-consuming.
That’s where...]]></description><link>https://kubernetesarchitectur.hashnode.dev/what-is-kubernetes-key-features-architecture-and-why-it-matters-in-modern-devops</link><guid isPermaLink="true">https://kubernetesarchitectur.hashnode.dev/what-is-kubernetes-key-features-architecture-and-why-it-matters-in-modern-devops</guid><category><![CDATA[Kubernetes]]></category><category><![CDATA[#Architecture_of_k8s]]></category><dc:creator><![CDATA[Sandeep Lagishetti]]></dc:creator><pubDate>Sat, 09 Aug 2025 16:24:49 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1754534226554/7018d100-e232-47fc-ab21-5265c4fab7eb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-introduction">Introduction</h3>
<p>In the world of modern software development, <strong>containers</strong> have revolutionized how we package and ship applications. However, managing containers manually—especially at scale—can become complex, error-prone, and time-consuming.</p>
<p>That’s where <strong>Kubernetes</strong> comes in.</p>
<p>Whether you're deploying microservices across clusters or just want to automate your application’s scaling and healing, Kubernetes offers a robust, enterprise-grade solution.</p>
<hr />
<h2 id="heading-what-is-kubernetes">What is Kubernetes?</h2>
<p><strong>Kubernetes</strong>, often referred to as <strong>K8s</strong>, is an open-source <strong>container orchestration</strong> platform that automates the deployment, scaling, and management of containerized applications.</p>
<ul>
<li><p>Originally developed by <strong>Google</strong> (based on their internal Borg system).</p>
</li>
<li><p>Now maintained by the <strong>Cloud Native Computing Foundation (CNCF)</strong>.</p>
</li>
<li><p>Supports various container runtimes like Docker, containerd, and CRI-O.</p>
</li>
</ul>
<p>At its core, Kubernetes turns a cluster of machines (physical or virtual) into a <strong>single logical compute platform</strong> where you can deploy and manage applications with high availability, scalability, and fault tolerance.</p>
<hr />
<h2 id="heading-what-is-container-orchestration">What is Container Orchestration?</h2>
<p>Container orchestration is the automated process of managing the lifecycle of containers — especially when you have many containers running across multiple servers (in a cluster). This includes tasks like:</p>
<ul>
<li><p>Starting and stopping containers</p>
</li>
<li><p>Scaling containers up or down</p>
</li>
<li><p>Managing networking between containers</p>
</li>
<li><p>Handling failures</p>
</li>
<li><p>Performing updates or rollbacks</p>
</li>
</ul>
<h2 id="heading-why-we-need-orchestration">Why We Need Orchestration?</h2>
<p>When you move from running 1-2 containers on a single machine to hundreds of containers across many machines, manual management becomes impossible. Orchestration tools solve this.</p>
<h2 id="heading-popular-container-orchestration-tools-comparison">Popular Container Orchestration Tools – Comparison</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Tool</td><td>Maintainer / Vendor</td><td>Supported Environments</td><td>Key Features</td><td>Pros</td><td>Cons</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Kubernetes</strong></td><td>CNCF (originally Google)</td><td>On-prem, Cloud (AWS, Azure, GCP, Hybrid)</td><td>Auto-scaling, self-healing, rolling updates, service discovery, persistent storage</td><td>Huge community, cloud-agnostic, extensible via CRDs, strong ecosystem</td><td>Steep learning curve, complex setup</td></tr>
<tr>
<td><strong>Docker Swarm</strong></td><td>Docker Inc.</td><td>On-prem, Cloud</td><td>Simple setup, native Docker integration, rolling updates</td><td>Easy to learn, fast setup, lightweight</td><td>Limited features vs Kubernetes, smaller community</td></tr>
<tr>
<td><strong>Amazon ECS</strong></td><td>AWS</td><td>AWS Cloud</td><td>Deep AWS integration, serverless option via Fargate</td><td>Fully managed, no cluster setup needed</td><td>AWS lock-in, less portable</td></tr>
<tr>
<td><strong>Nomad</strong></td><td>HashiCorp</td><td>On-prem, Cloud, Hybrid</td><td>Multi-runtime support (Docker, VMs, binaries), lightweight</td><td>Simple, integrates with HashiCorp tools</td><td>Smaller ecosystem, fewer built-in features than K8s</td></tr>
<tr>
<td><strong>OpenShift</strong></td><td>Red Hat (IBM)</td><td>On-prem, Hybrid Cloud</td><td>Kubernetes-based, developer-friendly tools, security enhancements</td><td>Enterprise-grade, built-in CI/CD</td><td>Licensing cost, resource-heavy</td></tr>
<tr>
<td><strong>Rancher</strong></td><td>SUSE</td><td>On-prem, Cloud</td><td>Multi-cluster Kubernetes management, GUI</td><td>Easy K8s management, multi-cloud support</td><td>Focuses on K8s (not standalone orchestrator</td></tr>
</tbody>
</table>
</div><h2 id="heading-real-time-example">Real-Time Example</h2>
<h3 id="heading-scenario">Scenario:</h3>
<p>You're deploying a web application that includes:</p>
<ul>
<li><p>Frontend (React) container</p>
</li>
<li><p>Backend (Node.js or Java) container</p>
</li>
<li><p>Database (MySQL) container</p>
</li>
</ul>
<h3 id="heading-manual-way">Manual way:</h3>
<p>You run docker run for each container. But if one crashes? Or if you want to scale up to 10 replicas of the backend?</p>
<h3 id="heading-orchestrated-way-with-kubernetes">Orchestrated way (with Kubernetes):</h3>
<p>1. Define a YAML file with all services (Deployment, Service)</p>
<p>2. Run: kubectl apply -f app.yaml</p>
<p>3. Kubernetes:</p>
<ul>
<li><p>Runs all containers on available nodes</p>
</li>
<li><p>Restarts crashed containers</p>
</li>
<li><p>Scales services with <code>kubectl scale</code></p>
</li>
<li><p>Balances load using internal Service</p>
</li>
</ul>
<h2 id="heading-key-features-of-orchestration-tools">Key Features of Orchestration Tools</h2>
<p>Feature Description</p>
<ol>
<li><p>Service Discovery: Automatically assign internal DNS to containers</p>
</li>
<li><p>Load Balancing: Distribute traffic between multiple containers</p>
</li>
<li><p>Self-Healing: Auto-restart failed containers</p>
</li>
<li><p>Scaling: Increase or decrease container count as needed</p>
</li>
<li><p>Rolling Updates: Update apps with zero downtime</p>
</li>
<li><p>Secret Management: Store passwords or tokens securely</p>
</li>
</ol>
<h2 id="heading-key-features-of-kubernetes-with-deep-dive">Key Features of Kubernetes (With Deep Dive)</h2>
<h3 id="heading-1-automated-scheduling">1. <strong>Automated Scheduling</strong></h3>
<p><strong>What it is:</strong><br />Kubernetes evaluates your application's resource requirements and automatically schedules Pods (containers) onto appropriate nodes in your cluster.</p>
<p><strong>How it works:</strong><br />The <strong>Kube-scheduler</strong> checks available resources like CPU, RAM, node affinity/anti-affinity, and taints/tolerations to decide where each Pod should run.</p>
<p><strong>Example:</strong><br />Suppose you have a cluster with 3 nodes:</p>
<ul>
<li><p>Node 1 has 4GB RAM free</p>
</li>
<li><p>Node 2 has 2GB RAM free</p>
</li>
<li><p>Node 3 has 8GB RAM free</p>
</li>
</ul>
<p>If your Pod requires 3GB RAM, Kubernetes will place it on <strong>Node 1 or Node 3</strong>, not Node 2.</p>
<hr />
<h3 id="heading-2-self-healing">2. <strong>Self-Healing</strong></h3>
<p><strong>What it is:</strong><br />Kubernetes monitors the health of containers and nodes. If a container crashes, becomes unresponsive, or fails a health check, it will be restarted or replaced automatically.</p>
<p><strong>Key components:</strong></p>
<ul>
<li><p><strong>Liveness probes</strong> check if the app is still running.</p>
</li>
<li><p><strong>Readiness probes</strong> check if the app is ready to receive traffic.</p>
</li>
</ul>
<p><strong>Example:</strong><br />Let’s say your Node.js app crashes due to memory leak. Kubernetes:</p>
<ul>
<li><p>Detects the crash</p>
</li>
<li><p>Terminates the Pod</p>
</li>
<li><p>Schedules a new one on a healthy node</p>
</li>
</ul>
<p>This minimizes downtime and eliminates the need for manual intervention.</p>
<hr />
<h3 id="heading-3-horizontal-pod-autoscaling-hpa">3. <strong>Horizontal Pod Autoscaling (HPA)</strong></h3>
<p><strong>What it is:</strong><br />Kubernetes can automatically scale your application Pods up or down based on CPU usage or custom metrics (e.g., request rate, memory usage).</p>
<p><strong>Command to enable HPA:</strong></p>
<pre><code class="lang-plaintext">bashCopyEditkubectl autoscale deployment web-app --cpu-percent=50 --min=2 --max=10
</code></pre>
<p><strong>Example:</strong><br />During peak traffic hours (say 6 PM), your web app scales up to 8 pods. When traffic drops at midnight, it scales down to 2 pods — <strong>saving compute cost</strong>.</p>
<hr />
<h3 id="heading-4-service-discovery-and-load-balancing">4. <strong>Service Discovery and Load Balancing</strong></h3>
<p><strong>What it is:</strong><br />Kubernetes assigns a <strong>DNS name and IP address</strong> to every service and ensures load balancing between Pods.</p>
<p><strong>Types of Services:</strong></p>
<ul>
<li><p><code>ClusterIP</code> – accessible within the cluster</p>
</li>
<li><p><code>NodePort</code> – exposed on a static port on each node</p>
</li>
<li><p><code>LoadBalancer</code> – uses a cloud provider’s external LB</p>
</li>
</ul>
<p><strong>Example:</strong><br />You have a backend service called <code>orders-service</code>. Other microservices like <code>payment-service</code> or <code>frontend</code> can access it via:</p>
<pre><code class="lang-plaintext">bashCopyEdithttp://orders-service.default.svc.cluster.local
</code></pre>
<p>Kubernetes <strong>automatically distributes</strong> requests to healthy Pods.</p>
<hr />
<h3 id="heading-5-rolling-updates-and-rollbacks">5. <strong>Rolling Updates and Rollbacks</strong></h3>
<p><strong>What it is:</strong><br />Kubernetes allows you to <strong>gradually roll out changes</strong> to your application with zero downtime. If something goes wrong, you can rollback to the previous version instantly.</p>
<p><strong>Example:</strong><br />You're upgrading <code>my-app</code> from v1 to v2:</p>
<pre><code class="lang-plaintext">bashCopyEditkubectl set image deployment/my-app my-app=app:v2
</code></pre>
<p>Kubernetes will:</p>
<ul>
<li><p>Start replacing Pods one-by-one</p>
</li>
<li><p>Wait for each to be healthy before continuing</p>
</li>
</ul>
<p>If v2 has a bug:</p>
<pre><code class="lang-plaintext">bashCopyEditkubectl rollout undo deployment my-app
</code></pre>
<p>And you're back to v1.</p>
<hr />
<h3 id="heading-6-secrets-and-configmaps">6. <strong>Secrets and ConfigMaps</strong></h3>
<p><strong>What it is:</strong></p>
<ul>
<li><p><strong>Secrets</strong> store sensitive data (API keys, passwords) in an encrypted form.</p>
</li>
<li><p><strong>ConfigMaps</strong> hold non-sensitive data (env variables, config files).</p>
</li>
</ul>
<p>These can be injected into Pods at runtime without hardcoding them into the container image.</p>
<p><strong>Example:</strong><br />Instead of storing the DB password in your code:</p>
<pre><code class="lang-plaintext">yamlCopyEditenv:
  - name: DB_PASSWORD
    valueFrom:
      secretKeyRef:
        name: db-secret
        key: password
</code></pre>
<hr />
<h3 id="heading-7-storage-orchestration">7. <strong>Storage Orchestration</strong></h3>
<p><strong>What it is:</strong><br />Kubernetes allows you to automatically mount <strong>persistent volumes</strong> to your Pods. You can dynamically provision storage from:</p>
<ul>
<li><p>AWS EBS</p>
</li>
<li><p>Azure Disk</p>
</li>
<li><p>GCP Persistent Disks</p>
</li>
<li><p>NFS, Ceph, etc.</p>
</li>
</ul>
<p><strong>Example:</strong><br />Define a <code>PersistentVolumeClaim</code> (PVC) in your YAML, and Kubernetes will:</p>
<ul>
<li><p>Provision the disk</p>
</li>
<li><p>Attach it to the Pod</p>
</li>
<li><p>Ensure data remains intact even if the Pod dies</p>
</li>
</ul>
<p>This is critical for stateful applications like:</p>
<ul>
<li><p>Databases (MySQL, MongoDB)</p>
</li>
<li><p>Logging tools (ELK stack)</p>
</li>
<li><p>File storage appsWhy Move to Kubernetes?</p>
</li>
</ul>
<p>Kubernetes offers <strong>operational excellence</strong> and <strong>developer agility</strong>, making it the standard for modern infrastructure. Here's why companies are embracing it:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Feature</td><td>Benefit</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Platform Agnostic</strong></td><td>Works on AWS, GCP, Azure, bare metal, or hybrid cloud.</td></tr>
<tr>
<td><strong>Vendor Neutrality</strong></td><td>Avoid lock-in to a single provider.</td></tr>
<tr>
<td><strong>Infrastructure Abstraction</strong></td><td>Developers focus on app logic, not infrastructure.</td></tr>
<tr>
<td><strong>Declarative Configuration</strong></td><td>Define desired state via YAML/JSON. Kubernetes maintains it.</td></tr>
<tr>
<td><strong>CI/CD Friendly</strong></td><td>Seamless integration with GitOps and modern pipelines.</td></tr>
<tr>
<td><strong>Community Support</strong></td><td>Thousands of contributors, CNCF-certified tools, huge ecosystem.</td></tr>
</tbody>
</table>
</div><hr />
<hr />
<h2 id="heading-kubernetes-architecture">Kubernetes Architecture:</h2>
<p>Kubernetes has a <strong>master-worker</strong> (control plane–node) architecture.</p>
<h3 id="heading-control-plane-components-master-node">Control Plane Components (Master Node)</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Component</td><td>Role</td></tr>
</thead>
<tbody>
<tr>
<td><strong>API Server</strong></td><td>Entry point to the cluster. All commands (<code>kubectl</code>, UI, REST) interact here.</td></tr>
<tr>
<td><strong>etcd</strong></td><td>A distributed key-value store for cluster configuration and state.</td></tr>
<tr>
<td><strong>Scheduler</strong></td><td>Assigns pods to nodes based on rules and available resources.</td></tr>
<tr>
<td><strong>Controller Manager</strong></td><td>Monitors and enforces the desired state (e.g., restart a failed pod).</td></tr>
<tr>
<td><strong>Cloud Controller Manager</strong></td><td>Handles cloud-specific integrations (load balancers, volumes).</td></tr>
</tbody>
</table>
</div><hr />
<h3 id="heading-node-components-worker-nodes">Node Components (Worker Nodes)</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Component</td><td>Role</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Kubelet</strong></td><td>Agent running on each node. Communicates with the control plane and manages pods.</td></tr>
<tr>
<td><strong>Kube-proxy</strong></td><td>Handles network routing, forwarding traffic to the correct pods.</td></tr>
<tr>
<td><strong>Container Runtime</strong></td><td>Executes containers (Docker, containerd, CRI-O).</td></tr>
</tbody>
</table>
</div><hr />
<h3 id="heading-flow-example">Flow Example:</h3>
<ol>
<li><p>You apply a deployment YAML via <code>kubectl</code>.</p>
</li>
<li><p>The API server stores the desired state in <code>etcd</code>.</p>
</li>
<li><p>Scheduler selects the best node for the pod.</p>
</li>
<li><p>Kubelet pulls the container image and starts the pod.</p>
</li>
<li><p>Kube-proxy ensures the service traffic reaches the right pod.</p>
</li>
</ol>
<hr />
<h2 id="heading-key-kubernetes-objects-resources">Key Kubernetes Objects (Resources)</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Object</td><td>Purpose</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Pod</strong></td><td>Smallest unit of deployment. Runs one or more containers.</td></tr>
<tr>
<td><strong>Deployment</strong></td><td>Ensures the desired number of pods are running. Manages rollout/rollback.</td></tr>
<tr>
<td><strong>Service</strong></td><td>Exposes pods to other services or external clients.</td></tr>
<tr>
<td><strong>ConfigMap</strong></td><td>Injects configuration data into pods.</td></tr>
<tr>
<td><strong>Secret</strong></td><td>Injects sensitive data securely.</td></tr>
<tr>
<td><strong>Namespace</strong></td><td>Logical partitioning within a cluster for teams/projects.</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-tooling-ecosystem">Tooling Ecosystem</h2>
<ul>
<li><p><strong>Helm</strong> – Package manager for Kubernetes (like apt/yum for clusters).</p>
</li>
<li><p><strong>Prometheus + Grafana</strong> – Monitoring and alerting.</p>
</li>
<li><p><strong>ArgoCD</strong> – GitOps-based continuous delivery.</p>
</li>
<li><p><strong>Istio/Linkerd</strong> – Service mesh for advanced traffic management.</p>
</li>
<li><p><strong>Kubectl</strong> – Command-line tool for managing K8s clusters.</p>
</li>
</ul>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>Kubernetes is more than just a container orchestrator—it's an <strong>operating system for the cloud</strong>. It abstracts away the underlying infrastructure complexities, enabling developers and operations teams to work more efficiently, reliably, and scalable.</p>
<p>As cloud-native adoption grows, Kubernetes remains at the forefront, empowering organizations to build resilient, scalable, and portable applications.</p>
]]></content:encoded></item></channel></rss>