💠 Kubernetes: Kubernetes is an open-source Container Management tool which automates container deployment, container scaling & container load balancing.
💠 Kubernetes cluster : Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.
💠 Kubernetes cluster Architecture
Kubernetes cluster has following three main components:
- Master node
- Worker/Slave nodes
- Control plane components
Let’s understand each component in detail:
◼ Master Node: It’s a node in kubernetes cluster on which kuberenetes is installed and it’s configured as master node.
- It manages the cluster and also store information about all nodes of the cluster.
- Master node keeps monitoring all the worker nodes and containers, pods on them. If any worker node fails, then workload from failed node is moved to another worker node by master node.
Master node does all of the above mentioned tasks with the help of set of components, which is known as ‘control plane components’.
Master node consist following control plane components, let’s have look on each of them
Kube-Scheduler : Scheduler decides which container should be placed on which node depending upon resource requirements of container, capability of worker nodes and some other constraints.
Kube-controller manager : It manages various controllers in k8s cluster. A controller is a process that continously monitors the state of various components within the system and works toward bringing entire system to the desired functioning state. (There are different types of controllers available in k8s e.g Node controller, replication controller, etc. )
Kube-API server : It’s a primary management component of kubernetes cluster. It balances all operation in cluster.
- It send instructions and information to kubelet on worker node regarding deployment of pods on worker nodes
- It exposes the k8s API which is used by external users to perform management operations on the cluster.
- Kube-API server is the only component that interact with ETCD cluster directly, otherwise all other components uses the API server to perform updates in ETCD cluster.
ETCD cluster : It’s a database which stores information in key-value format. It store information like which container or which pod exists on which node, at what time container is deplyoed on node,etc.
◼ Worker/Slave nodes- It is a physical server or Machine or a VM which runs the applications using Pods which is controlled by the master node.
Worker node has following components:
Kubelet: It manages all operations on worker/slave node.
- Kubelete does task of deploying appropriate pods and containers on worker nodes according to instructions and information received from the kube-api server.
- It send information/reports about the status of the worker node and containers on it to master node through Kube-api server.
Kube-proxy: It enables the communication between worker nodes, it means application running on one container can communicate with, another application or server running on another container on another node using kube-proxy.