Debug School


Posted on

How Kubernetes works?All components and roles of their components

Kubernetes is a system that manages containers (containerized applications) where a container could be explained as a lightweight virtual machine. To build an application you need to build a bunch of containers and then use Kubernetes to manage those containers.

A Kubernetes cluster has two main components—the control plane and data plane, machines used as compute resources :
-The control plane hosts the components used to manage the Kubernetes cluster.
-Worker nodes can be virtual machines (VMs) or physical machines. A node hosts pods, which run one or more containers.

Here are the main components of the control plane:

  1. kube-apiserver : Provides an API that serves as the front end of a Kubernetes control plane. It is responsible for handling external and internal requests—determining whether a request is valid and then processing it.
  2. kube-scheduler : This component is responsible for scheduling pods on specific nodes according to automated workflows and user defined conditions, which can include resource requests, concerns like affinity and taints or tolerations, priority, persistent volumes (PV), and more.
  3. kube-controller-manager : The controller manager is responsible for several controllers that handle various automated activities at the cluster or pod level, including replication controller, namespace controller, service accounts controller, deployment, statefulset, and daemonset.
  4. etcd : A key-value database that contains data about your cluster state and configuration. Etcd is fault tolerant and distributed.
  5. cloud-controller-manager : It enables you to connect a Kubernetes cluster with the API of a cloud provider.

Here are the main components of the Worker nodes:

  1. Nodes : Nodes are physical or virtual machines that can run pods as part of a Kubernetes cluster.
  2. Pods : A pod serves as a single application instance, and is considered the smallest unit in the object model of Kubernetes.
  3. Container Runtime Engine : Each node comes with a container runtime engine, which is responsible for running containers.
  4. kubelet : Each node contains a kubelet, which is a small application that can communicate with the Kubernetes control plane.
  5. kube-proxy : All compute nodes contain kube-proxy, a network proxy that facilitates Kubernetes networking services.
  6. Container Networking : Container networking enables containers to communicate with hosts or other containers.

Top comments (0)