K8s Architecture
Hurray! Vehement readers, I’m up with another article on this awesome DevOps tool, Kubernetes. This article is apropos the tool’s majestic architecture.
“ In the DevOps kingdom, deployment era tends to be the most crucial and could get any involved person-in-charge, crucible! So, how to survive this dynamic era, get the end-product delivered to the client, and thrive in the software market? If deployment is the era, then Kubernetes is the King who reigns the Kingdom. And obviously, any king has to perform multiple tasks; sometimes manage, sometimes get-hands-dirty, give commands and monitor the progress, protect the integrity of secrets, cross-check the errors, rectify them and store the sovereignty information for future references, etc. So the King’s architecture somehow has to be so majestic, isn’t it? But I will try my best to make it as comprehensive and to-the-point as possible without any clutters.”
Here we go..
Let me break it down into multiple parts:
- Nodes and Types
- Inevitable Installations
- Master Node Processes
Nodes and Types:
The architecture involves 2 different types of nodes. They are:
- Master Nodes
- Worker Nodes
-> A master node is like a commander that decides what to be done, gives orders to the worker nodes, checks whether all the worker nodes are up-to-date, monitors the process of execution and it does health checks as well. Depending upon HA and scalability needs, the number of master nodes can be increased.
-> A worker node is the one that gets the work done. It receives commands from the master node and executes as per the given sequence. Usually, a K8s cluster has multiple worker nodes.
Inevitable Installations:
- Container Runtime Interface
- Kubeproxy
- Kubelet
-> CRI is just about the runtime environment for containers. It’s obvious that a Container Orchestration Engine anyways has to be configured with runtime for it to carry out its orchestration and that can be any of our preferred environments.
-> Kubeproxy offers a space for networking just like forwarding requests among the pods and services.
-> Kubelet acts as the communication channel between containers and the nodes responsible for starting them.
Master Node Processes:
- API Server
- Scheduler
- Controller Manager
- etcd
API Server:
An API Server is also popularly referred to as the “Control Plane”. It stands as the primary authentication mechanism which receives requests, checks, validates, confirms, and forwards to another respective process. In simple words, the API Server is an initial gateway to the Kubernetes cluster.
Scheduler:
Upon validation by the API Server, requests are received by the Scheduler. On Scheduler’s end, it generates a sequential mechanism to process the request and passes it on to the kubelet which is residing in the worker node. Kubelet, then schedules the job and makes changes to the cluster to serve responses as per the sequence generated by the Scheduler.
Controller Manager:
The Controller Manager monitors are the events occurring inside the cluster. It handles any disasters and emergency compromisations within the cluster. Mostly its ideals fall out to the recovery of failed pods.
etcd:
etcd is colloquially known as the “Cluster Brain”, as it stores all the information and records all the events that occurred inside the cluster. Every other process is dependent on etcd. Each and every log is present in it and all the processes count on etcd for information consumption.
Folks, the above-mentioned processes are related to the master node and the worker nodes are stacked with the basic components. They both work cordially for achieving the prime purpose of orchestration. If you are curious to know about the components, I have written an article on them as well. I’m dropping the link to it, feel free to check the article. https://santhiyasandyrc.medium.com/a-short-note-on-k8s-components-e13461af1984
I publish articles on DevOps and SDLC trends. So, if you’re someone who’s curious to learn about them, hit the follow button so that you don’t miss any of my updates.
Hope you had an informative read!