The architecture of Kubernetes is designed to make it easy to deploy, scale, and manage containerized applications. It consists of different components that work together to provide a flexible and robust platform.
A cluster contains at least one master and one worker node, or one master and multiple worker nodes.
Master Node Components
The master runs a set of processes in Kubernetes that ensure the smooth functioning of the cluster. This set of processes is called the Control Plane.
A cluster can have one or more masters.
API Server
The API server is the central control plane component that runs the Kubernetes API. It is the entry point for all administrative tasks, validating and configuring data for API objects such as Pods, services, and controllers.
Users or admins communicate with the API server to perform various tasks through Kubectl.
Etcd
ETCD is a database that stores all data, such as cluster configuration, pod details, and other information.
The data is stored in key-value form.
It is fully replicated, fast, and secure.
Controller Manager
To ensure the desired state matches the actual state, the controller manager makes sure everything is in place.
It checks background processes and handles routine tasks in the cluster.
If Kubernetes is run on the cloud, it will be the cloud controller manager.
If Kubernetes is run on non-cloud, it will be the kube-controller manager.
Node Controller - Responsible for node setup and their state.
Route Controller - Responsible for setting up the network.
Service Controller - Responsible for load balancing.
Volume Controller - Responsible for creating and mounting volumes.
Kube Scheduler (Action)
This component runs actions in the entire cluster, such as assigning nodes to newly created pods.
It acts based on resource availability and tolerations.
Worker Node
Kubelet
Kubelet monitors the desired state of the Pod and communicates with the API server for any changes.
Kubelet runs on every node and keeps track of everything on the node.
Uses port number 10255.
Sends success or failure reports to the master.
Kube- Proxy
Kube-proxy is a network proxy that runs on each worker node, assigning IPs to Pods.
It maintains network rules on nodes, allowing network communication to and from Pods both inside and outside the cluster.
Kube-proxy handles traffic routing and load balancing for services.
Container Engine
The container engine works with kubelet to pull images, and start, and stop containers.
It exposes the container according to the given manifest.
POD
It is the smallest unit in Kubernetes.
A Pod is a group of one or more containers that are deployed on the same host.
In Kubernetes, the control unit is the Pod, not the container. This means the master works with Pods, not containers.
Containers cannot start without a Pod.
One Pod usually contains one container.
Multi-container Pods share the same volume, are connected on the same local host, and access the same memory space.
There is no default auto-healing and scaling.
To summarize this article, we have explored the architecture of Kubernetes and its various components.
Thank you for your time.
**See you soon…**😊