Debug School

prashant
prashant

Posted on

How Kubernetes works? All components and roles of their components

k8s cluster contains master and workers node. Master nodes distributes the workloads to the worker nodes and Worker nodes hosts the containers/pods.

Master Node components:
apiserver: Api server is used to establish any communication with the k8s cluster through REST APIs. Any input to k8s cluster is received in JSONs or .yml.
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.
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.
Kube scheduler - It watches apiserver for any new pods and schedules them in the available nodes.

Worker Nodes components:
Kubelet: kublet is 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.
Container Engine: Container engine is used for Container management like pulling images and starting and stopping containers.
Kube Proxy: Kube-proxy handles all networking requirements including load balancing across all pods, POD IP addresses.

Top comments (0)