Debug School

Posted on

How Kubernetes works?All components and roles of their components

A kubernetes cluster contains master nodes and few worker nodes.
Worker nodes hosts the containers/pods and master nodes distributes the workloads to the worker nodes.
To achieve this behavior several components needs to be installed in Master nodes and Worker Nodes.
Components in Master Node:

  1. apiserver: Api server is used to establish any communication with the kubernetes cluster through REST APIs. Any input to kuberenets cluster is received in JSONs.
  2. Cluster storage: Its used to store all configuratons and state information of the cluster. It uses etcd to store the data. apiserver will connect with cluster store to fetch these informations.
  3. Kube Contoller manager- It runs in infinite loop and watches for any changes in the cluster. Status is collected and shared with apiserver thus ensuring apiserver has the latest status. Each component in the cluster has a separate controller. Eg: Node, Endpoint, Namespace etc.
  4. Kube scheduler - It watches apiserver for any new pods and schedules them in the available nodes.

Components in Worker Nodes:

  1. Kubelet: It's an agent deployed in worker nodes and communicates with master node through apiserver. Kubelet instantiates pods in the nodes. Any nodes to be added to cluster requires kubelet to be setup.
  2. Container Engine: Container engine is used for Container management like pulling images and starting and stopping containers. 3.Kube Proxy: Kube-proxy handles all networking requirements including load balancing across all pods, POD IP addresses.

Top comments (0)