Kubernetes Architecture Explained: A Beginner-Friendly Guide


Kubernetes Architecture Explained: A Beginner-Friendly Guide
Start your container orchestration journey by learning the architecture of Kubernetes π
Understanding Kubernetes architecture is the first step toward mastering container orchestration. In this guide, weβll break down Kubernetes components in a simple and beginner-friendly way.
What Is Kubernetes Architecture?
Kubernetes architecture consists of a cluster of machines, which can be either physical or virtual. These machines are called nodes.
Each node plays a specific role in running and managing containerized applications.
There are two types of nodes in a Kubernetes cluster:
Worker Nodes
Control Plane (Master Node)
Worker Nodes
Worker nodes are the machines that actually run your applications. Each worker node hosts one or more Pods, which contain containers.
Main Components of a Worker Node
Every worker node runs the following core components:
Container Runtime
Kubelet
Kube-Proxy
1. Container Runtime
The container runtime is responsible for running containers on the node.
Examples:
Docker
containerd
CRI-O
It pulls container images and starts or stops containers as required.
2. Kubelet
Kubelet is an agent that runs on every worker node.
Its responsibilities include:
Communicating with the Kubernetes control plane
Creating and managing Pods on the node
Assigning node resources like CPU and memory
Ensuring containers inside Pods are running as expected
In simple terms, Kubelet makes sure the desired state matches the actual state.
3. Kube-Proxy
Kube-Proxy handles network communication.
It ensures:
Pods can communicate with other Pods
Services can route traffic to the correct Pods
Networking rules are properly maintained across the cluster
Control Plane (Master Node)
The control plane manages the Kubernetes cluster. It makes decisions about scheduling, scaling, and maintaining the desired state of the cluster.
Each control plane node runs several critical components.
Core Control Plane Components
etcd
Kube-API Server
Kube-Scheduler
Kube Controller Manager
1. etcd
etcd is a distributed, reliable key-value store.
It stores:
Cluster state
Configuration data
Metadata for all Kubernetes objects
etcd is considered the single source of truth for the cluster.
2. Kube-API Server
The Kube-API Server is the entry point to the Kubernetes cluster.
Key responsibilities:
Exposes Kubernetes APIs
Handles requests to create, update, or delete Kubernetes objects (Pods, Services, Deployments, etc.)
Provides a REST-based interface
kubectlebnf and kubeadmebnf communicate with the cluster through the API server.To view available Kubernetes resources, run:
kubectl api-resources
3. Kube-Scheduler
The Kube-Scheduler decides where a Pod should run.
It:
Watches for newly created Pods
Selects the best available worker node
Considers CPU, memory, and resource availability
4. Kube Controller Manager
The Kube Controller Manager runs control loops that continuously monitor the cluster.
Some important controllers include:
Node Controller β Detects node failures and takes action
Replication Controller β Ensures the desired number of Pod replicas are always running
If a Pod or node fails, controllers automatically work to restore the desired state.
How Everything Works Together (High-Level Flow)
User sends a request using kubectl
Request reaches the API Server
Scheduler assigns Pods to worker nodes
Kubelet runs Pods on nodes
Kube-Proxy enables network communication
Controllers continuously monitor and heal the cluster
Conclusion
Kubernetes architecture may look complex at first, but itβs built on clear responsibilities:
Worker nodes run applications
Control plane manages and maintains the cluster
Components work together to provide scalability, reliability, and self-healing
Understanding this architecture is the foundation for learning Pods, Deployments, Services, and Kubernetes networking.
Happy learning and welcome to Kubernetes π