Detailed Architecture Of Kubernetes

Detailed Architecture Of Kubernetes

Kubernetes Architecture is a cluster of number of nodes few of them are master nodes [control plane] and others are worker nodes. A cluster can be made of a minimum of one master and one worker node. master and worker nodes have their own internal components which make the cluster functional.

1] Let's Start with Master Node:

Components:

  1. API-Server

  2. Controller Manager

  3. Etcd

  4. Kube Scheduler

A] API-Server:

API-Server is the entry point to the Kubernetes cluster. To interact with the cluster using Kubernetes manifest file written in YAML or JSON format user can communicate with the API server only. Thus we can say it is the front end of the master node [control plane].

B] Controller Manager:

Controller Manager is responsible for verifying the actual state of the cluster with the desired state via API-Server and if there is a mismatch it works in the direction of making them equal. controller manager itself has different components like Route controller, Node Controller, Service Controller and Volume controller.

C] Etcd:

Etcd is the database where metadata and status of the cluster are stored in the key-value pair format. It is very secure and highly available. it can perform 10000 writes per second.

D] Kube Scheduler:

Kube Scheduler is the one who schedules the pod on the worker nodes. it schedules using the requirements of resources of the pod like CPU, Memory etc. The node which fulfils the resource requirements Kube scheduler schedules the pod on that particular node. It is responsible for pod creation and its management.

2] Now let's look into the worker node components:

Components:

  1. Kubelet

  2. Kube-Proxy

  3. Container Runtime

A] Kubelet:

Kubelet is the agent which communicates with the master node and also ensures that containers are running in the pod. Specifically, it interacts with the API-Server which gives instructions or the specifications of the pod to the kubelet and kubelet acts accordingly.

B] Kube-Proxy:

For networking of the node with other nodes and external networks Kubernetes make use of kube-proxy. it assigns IP-address to each pod. Mainly we can say kube-proxy is responsible for networking.

C] Container Runtime:

Container Runtimes like Docker, RKT, containerd are responsible for starting/stopping containers. it interacts with the kubelet and creates containers according to the requirements like pulling the images, exposing the ports etc.

Now what is the POD in the cluster?

The pod is the smallest unit of the Kubernetes. it is like an envelope around the containers. A single pod may contain multiple containers but it is preferred to have one container per pod. it is because containers in the pod are tightly coupled if one container stops working remained also stops.

Pods have a limited life span they die while scaling up and scaling down and also if containers stop working inside them.

Conclusion:

Now after reading this article, we gained knowledge about what is Kubernetes cluster, what components are responsible for working of the cluster and how they internally communicate with each other etc etc etc.

Thank You!!!

Did you find this article valuable?

Support Pranav Thorve by becoming a sponsor. Any amount is appreciated!