DEV Community

Cover image for Learn Kubernetes Architecture : In different way
Dhritiraj Nath
Dhritiraj Nath

Posted on

Learn Kubernetes Architecture : In different way


Welcome to my vlog , I am continuing my DevOps journey and this is my first vlog . The only prerequisites before you moving forward in this vlog is basic knowledge of Docker. And do not worry if you do not know about Kubernetes architecture before I am very sure that you will understand everything.
Today we are going to learn about the Architecture of Kubernetes(K8S).
Kubernetes is mainly split into two major parts:

1. The control plane (Master or the Manager of Kubernetes or you can assume it as brain of Kubernetes)

2. Data Plane (Worker Nodes or who is actually building the application)

Now lets talk about the Workers or Data plane first. Data plan includes mainly 3 components:

1.Kubelet:

- Responsibility: it acts like a captain of the worker node. It ensures that pods are running and healthy.

- Auto healing node: If a pod stops running , the Cubelet informs the control plain(the brain) to take necessary action(like restarting or recreating it).

2. Kube Proxy (Q Proxy):

- Responsibility: Handles networking for the pods.

- Mechanism: It uses IP tables(Linux network rules that send traffic from a Service to the correct Pod) on the linux host to manage IP address allocation and basic load balancing .(eg: Splitting traffic between multiple replicas of a pod)

3. Container Runtime:

- Responsibility: It is basically the execution environment that actually runs the container.

- Flexibility: Unlike Docker, which mainly uses its built-in runtime stack(means Docker already has a fixed set of runtimes inside it, so you normally don’t choose or change them.), Kubernetes supports multiple runtimes via Container Runtime Interface (CRI).Examples include containerd, CRI-O, and earlier Docker via Dockershim.

Now lets talk about the Master or Control plane . Control plan includes mainly 5 components:

1. API Server:

- Responsibility: This the entry point for all administrative tasks. It exposes the Kubernetes API to the external world(users, CLI etc).

- Core Rule: Every single request goes through the API server first.

2.Scheduler:

- Responsibility: This basically decides in which worker node a pod should be placed on based on resource availability(eg: If node 1 is, put the pod there).

3.ETCD:

- Responsibility: A distributed Key-value store that acts as the backing store for all cluster data.

- Importance: It holds the entire state of the cluster, Without it you cannot restore or manage the cluster.

4.Controller Manager:

- Responsibility: It is responsible for maintaining the Desired State. It constantly compares what is running(current state) against what you asked for in your YAML files(Desired State).
If there is mismatch (eg: a pod crashes), the controller manager is responsible for identifying the failure and triggering the fix.

5.Cloud Controller Manager(CCM):

- Role: This is a specific component that bridges the gap between Kubernetes and underlying cloud providers like AWS(EKS), Azure(AKS), Google Cloud(GKE).

- Responsibility: It translates generic Kubernetes request into specific cloud API calls
Example: If you request a "Load Balancer" in Kubernetes, the CCM translates this into a request to create an AWS ELB or an Azure Load Balancer
NOTE:If you are running Kubernetes "On Premises"(on your server not in cloud) this component is not required.

  That's it! I hope you understand each component of Kubernetes. Thank you. 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)