DEV Community

Vaibhav
Vaibhav

Posted on

Kubernetes Architecture- Worker Node

The Worker Node is the mediator who manages and takes care of the containers and communicates with the Master Node which gives the instructions to assign the resources to the containers scheduled. A Kubernetes cluster can have multiple worker nodes to scale resources as needed.

The Worker Node contains four components that help to manage containers and communicate with the Master Node:

  1. Kubelet: kubelet is the primary component of the Worker Node which manages the Pods and regularly checks whether the pod is running or not. If pods are not working properly, then kubelet creates a new pod and replaces it with the previous one because the failed pod can’t be restarted hence, the IP of the pod might be changed. Also, kubelet gets the details related to pods from the API Server which exists on the Master Node.
  2. Kube-proxy: kube-proxy contains all the network configuration of the entire cluster such as pod IP, etc. Kube-proxy takes care of the load balancing and routing which comes under networking configuration. Kube-proxy gets the information about pods from the API Server which exists on Master Node.

  3. Pods: A pod is a very small unit that contains a container or multiple containers where the application is deployed. Pod has a Public or Private IP range that distributes the proper IP to the containers. It’s good to have one container under each pod.

  4. Container Engine: To provide the runtime environment to the container, Container Engine is used. In Kubernetes, the Container engine directly interacts with container runtime which is responsible for creating and managing the containers. There are a lot of Container engines present in the market such as CRI-O, containerd, rkt(rocket), etc. But Docker is one of the most used and trusted Container Engine. So, we will use that in our
    upcoming day while setting up the Kubernetes cluster.

Let’s continue to understand all four components with a real-time example.

Worker Nodes — Storefronts:

Kubelet — Store Managers:

● In each store (Worker Node), you have a store manager (Kubelet) who ensures employees (Pods) are working correctly.
● Kubelet communicates with the Master Node and manages the Pods within its store.

kube-proxy — Customer Service Desk:

● kube-proxy acts like a customer service desk in each store. It handles customer inquiries(network requests) and directs them to the right employee (Pod).
● It maintains network rules for load balancing and routing. Container Runtime — Employee Training:
● In each store, you have employees (Pods) who need training to perform their tasks.
● The container runtime (like Docker) provides the necessary training (runtime environment) for the employees (Pods) to execute their tasks.

Top comments (0)