โธ๏ธ Kubernetes Architecture โ A Beginner-Friendly Guide

๐จโ๐ป Last-year student diving deep into DevOps, Cloud Engineering, and Infrastructure Automation. Passionate about building scalable, efficient, and secure systems. Letโs connect and build something amazing! ๐
๐ What is Kubernetes?
Kubernetes (K8s) is an open-source platform that automates the deployment, scaling, and management of containerized applications.
It helps developers and DevOps teams run applications efficiently across multiple environments on-premise or in the cloud.
๐น Quick Facts about Kubernetes
โ
Developed by Google and later donated to the Cloud Native Computing Foundation (CNCF).
โ
Inspired by Googleโs internal cluster management system, Borg.
โ
Why "K8s"? The 8 represents the number of letters between K and s in Kubernetes โ K8s.
๐ฏ Why Use Kubernetes? (Key Benefits)
โ
Automated Scaling โ Adjusts the number of running containers based on traffic.
โ
Self-Healing โ Restarts failed containers, replaces them, and reschedules on healthy nodes.
โ
Load Balancing โ Distributes traffic evenly across containers.
โ
Service Discovery โ Helps services find and communicate with each other.
โ
Declarative Configuration โ Uses YAML/JSON files to define infrastructure.
โ
Multi-Cloud Support โ Works on AWS, Azure, GCP, or on-premises.

๐ Kubernetes Architecture
Kubernetes follows a Master-Worker Node Architecture, where the Control Plane(Master) manages the Worker Nodes.
๐ Main Components
1] Control Plane (Master Node) โ The "Brain" of Kubernetes
Manages the overall cluster.
Ensures workloads run where needed.
Main Responsibilities
โ Schedules workloads on worker nodes.
โ Handles cluster-wide decisions.
โ Manages communication between components.
2] Worker Nodes โ The Machines Running Applications
- Handle the actual execution of applications.
3] kubectl โ The Command-Line Tool
Used to interact with Kubernetes.
Sends instructions to the API Server.
๐ฅ Control Plane Components
Manages the entire cluster, ensuring apps run as expected.
๐น API Server ๐ โ The entry point for all requests, like a city hall processing permits.
๐น Scheduler ๐ โ Assigns workloads (pods) to worker nodes, like a dispatcher.
๐น Controller Manager โ๏ธ โ Watches over the cluster, fixing issues automatically.
๐น etcd ๐ข โ The memory, storing all cluster configurations.
๐ Worker Nodes (The Workforce ๐ช)
These are the machines where actual applications run.
๐น Kubelet ๐น โ Ensures containers run properly, like a site supervisor.
๐น Kube Proxy ๐น โ Handles networking, ensuring smooth communication.
๐น CNI ๐ โ Manages IP addresses and connections between pods.
๐ฎ kubectl (Command-Line Interface)
Installed on the user's machine.
Interacts with the API Server to manage Kubernetes clusters.
Common commands:
๐นkubectl applyโ Deploy apps
๐นkubectl get podsโ View running applications
๐นkubectl deleteโ Remove applications
๐ Difference Between kubectl and kubelet
| Feature | kubectl ๐ฅ (Command Tool) | kubelet ๐ (Worker Agent) |
| Definition | CLI tool to interact with the cluster. | An agent running on worker nodes. |
| Role | Sends commands to the API Server. | Ensures containers are running. |
| Location | Installed on a user's machine. | Runs on each worker node. |
| Usage | Used for deploying, inspecting, and managing apps. | Communicates with the Control Plane. |
๐ The Role of the API Server
The API Server is the heart of Kubernetes. It serves as the main gateway for all communication inside the cluster.
๐ What Does the API Server Do?
โ
Accepts requests from kubectl, UI, or other tools.
โ
Validates and processes those requests.
โ
Stores cluster configurations in etcd.
โ
Acts as the single source of truth for the cluster.




