Debug School

Subham Chowdhury
Subham Chowdhury

Posted on

What is Kubernetes by Subham

What is Kubernetes ?

Ans: Kubernetes in simple term is an container Orchestrator tool. It was developed by Google and is now part of CNCF since 2014. It developed in Go/Golang.

Why Do we need Kubernetes? Explain in 10 lines

Ans: Docker helped us to run our application in a single container. Now in a real production application typically you need 100'snof docker container to run your application efficiently. However you need some one who will ensure that all these container are working as per expectation. There has to be someone who needs to ensure that when there is downtime , these container can be re initialized without any human intervention. And there comes the Kubernetes to help us in this matter. Kubernetes also ensures that whatever X number of container are desired to be executed at any given point of time , it will make sure that desire is always fulfilled. So K8s will listen, persist, monitor and schedule all the containers in a POD and this will be a guaranteed service.

How Kubernetes Works?

Ans: Kubernetes works in the following manner

Humans Shares Instructions via a deployment script ---->

              K8s Cluster
Enter fullscreen mode Exit fullscreen mode


  1. Master node Receives the instruction
  2. Master deciphers the instruction and delegates the instruction to be performed to a scheduler .
  3. Master also ensure that this instructions are persisted in etcd cluster.
  4. Master instructs controller manager to to monitor and report the status of minions
  5. scheduler now gets the instruction to NOde worker which inturn makes the desired PODS where the container will run.

Kubernetes Architecture. Explain each component with 1 one-liner.

Image description

The K8s architecture is divided into two parts

Master Node:
Master Node Comprises of 4 major sw components
1) API Server - This is the heart of the Master node and it is a conglomeration of many API. All the communications from external world and internal are done via apiserver. It accepts json. It communicates to other components of the Master Node. viz Scheduler, etcd, and Controller Manager.
2) etcd - This is the DB of the Master node. It maintains a Key Value way of storage of all information in the k8s cluster. It is single source of Truth , meaning if any any entry is present in it then it is for sure it available in the cluster and vice versa. There can be cluster if etcd for HA.
3) Controller Manager - This component's job is to monitor and report the state of the desired items as per the client request. The manager contains 100's of controller which are having mutually exclusive responsibility to monitor individual parameter and report back to apiserver .
4) Scheduler - The job of the scheduler is to tell the worker what work it needs to be done. It only instructs and does not do any job itself.

Worker Node:
Worker node comprises of 3 main components :
1) Kubelet : Kubelet ensures that it register the worker node with master. it connects with api server which inturn publishes a certificate that allows the worker to be part of the k8s cluster as a worker node. It Constantly communicates with Master to get the required instruction.

2) Container Engine - This is the runtime of the container which sis responsible for pulling and uploading images from a trusted repository. The container runtime can be Docker, containerd , Rocket . etc.

3) Kube Proxy : This is the network adapter that is required to communicate with Master nodes api server. It is not bundled as part of the K8s and we have to install it from CNCF option like calico, etc

Top comments (0)