Kubernetes Architecture & Components
Hey geeks!! Welcome Back :)
What is Kubernetes???
This is the first question that will come in your mind while travelling in devops journey!!
- If you search on the internet for the same, the only answer is “Its a container orchestration tool”.But I want to add some moreeeee info to this article about kubernetes.
Let’s Begin!!
- Daaaa, you know what! “kubernetes” is a greek word and it means “pilot” or person who “steers the boat/ship” or “Helmsman”.
- Kubernetes is a objective for running and managing containers from many container runtimes & supports numerous container runtimes including Docker, containerd, CRI-O.
- Now kubernetes is not coming with docker by default, we can install container runtimes as per our choice.
Also simply we can call Kubernetes as “K8s” :)
Architecture


As per PIC-2
1- User is hitting a kubectl command to create (also delete,update,run etc actions) a pod where first it reaches to Kube API server then it will check user’s authentication and authoraization.
2- Kube API server will check with ETCD for the same.
3- If user is legit then it will inform to Kube Api server and stores the deployment configuration file.
4- Kube API Server will send the pod deployment request to SCHEDULER.
5- SCHEDULER will tell to Kube API server on which node the pod can be deployed as per pod size and capacity requirement.
6- Kube API server will tell the node through KUBELET to deploy the pod.
7- KUBELET will tell to container runtime to deploy the container in pod.
8- Once the container is created container runtime will inform to KUBELET.
9- KUBELET will tell to Kube Api server on successfull deployment of Pod.
10- Kube API server will store the same status in ETCD.
11- Kube API server will show the status to the user once pod is created.
Let’s discuss on all components!!
KUBE API SERVER —
In simple words I can say Kube Api Server is a main “controller” of your k8s cluster, Kube Api Server is also like a bridge between other components to communicate.
Once we send any request with “kubectl” commands, API call will reach to Kube Api Server first.
ETCD-
ETCD is like a brain to your k8s cluster which stores all configurations,metadata, state and sensitive information also.
SCHEDULER-
Scheduler is responsible to distribute the workloads to nodes equally and allocating pods to available nodes.SCHEDULER always Watches newly created pods that have no node assigned and selects a node for them to run on.
NODE-
Node will be your physical machine or a VM,node is a worker machine and this is where containers inside the pods will be launched.
KUBELET-
Kubelet is the agent that runs on each node in your cluster. The agent is responsible for making sure that the containers are running on the nodes.kubelet doesn’t manage containers which were not created by Kubernetes, also manages network rules & port forwarding.
Container-Runtime-
Container Runtime is the software that is responsible for running containers. Kubernetes supports several runtimes: Docker, containerd, cri-o, rktlet.
Controller-Manager-
Controller-Manager has 4 set of controllers as below:
- Node Controller — This will continously monitoring on nodes, it will notice and respond on any node is down or not responding.
If it stops receiving signals from a node, the node is marked unreachable but it waits for 40 seconds before marking it unreachable. After the node is marked unreachable it waits for 5 minutes to come back up if it doesn’t, it removes the pods assigned to that node and provisions them on the healthy nodes if pods are part of the replica set.

2. Replica Controller- If a POD dies it will create another POD. It makes sure that desired number of PODs or at least one POD is in running state.
3. Job Controller- When a new task comes, Job controller makes sure that in the cluster, the kubelets on nodes are running a good number of PODs to complete the work.Job controller tells kube-apiserver to create or remove PODs.
4. Deployment Controller- Deployments are managed by the Kubernetes Deployment controller.Deployments use a Pod template, which contains a specification for its Pods. The Pod specification determines how each Pod should look like: what applications should run inside its containers, which volumes the Pods should mount, its labels, and more.
5. Service Account and Token Controllers- Create default accounts and API access tokens for new namespaces.
- We have 1 more component called as “Cloud Controller Manager”

Cloud Controller Manager-
- Node Controller- For checking the cloud (AWS,GCP.AZURE etc) provider to determine if a node has been deleted in the cloud after it stops responding.
2. Route Controller — For setting up routes in the underlying cloud (AWS,GCP.AZURE etc) infrastructure.
3. Service Controller- For creating, updating, and deleting cloud provider(AWS,GCP.AZURE etc) load balancers.
4. Volume Controller- For creating, attaching, and mounting volumes, and interacting with the cloud provider (AWS,GCP.AZURE etc) to orchestrate volumes.
Kube-Proxy-
kube-proxy can run in three different modes:
- Iptables (default mode)
- ipvs
- userspace (“legacy” mode, not recommended anymore)
The Kube proxy is a daemon running on each node. It basically reflects the services defined in the cluster and manages the rules to load-balance requests to a service’s backend pods.


We can discuss on Services, Namespaces, security & more on next article
That’s It folks!! Please provide your feedback in comments and if this article is helpful give a like (clap) :)