Kubernetes follows the client-server architecture where we have the master installed on one machine and the node on separate Linux machines. It follows the master-slave model, which uses a master to manage Docker containers across multiple Kubernetes nodes. A master and its controlled nodes constitute a “Kubernetes cluster”.
Key components of Kubernets
Master Node Components
1.API server: The API server is the entry point for all the REST commands used to control the cluster. All the administrative tasks are done by the API server within the master node. Users send REST commands in YAML/JSON to the API server, which processes and executes them. The API server acts as the front end of the Kubernetes control plane.
2.Scheduler: It is a service in the master responsible for distributing the workload. It is responsible for tracking the utilization of the working load of each worker node and then placing the workload on which resources are available and can accept the workload. The scheduler is responsible for workload utilization and allocating the pod to the new node.
3.etc: It is a distributed key-value store, maintains the cluster state and configuration details like subnets and config maps in Kubernetes’ database. It’s where Kubernetes stores its information. It is written in the Go programming language.
4.Controller Manager: Also known as controllers. It is responsible for collecting and sending information to the API server. Basically, the controller watches the desired state of the cluster if the current state of the cluster does not meet the desired state then the control loop takes the corrective steps to make sure that the current state is the same as that of the desired state.
Worker Node Components
1.Kubelet: It is a primary node agent which communicates with the master node and executes on each worker node inside the cluster. If kubelet notices any issues with the pods running on the worker nodes then it tries to restart the pod on the same node. If the issue is with the worker node itself then the Kubernetes master node detects the node failure and decides to recreate the pods on the other healthy node.
2.Kube-proxy: It is the core networking component inside the Kubernetes cluster. It is responsible for maintaining the entire network configuration. Kube-Proxy maintains the distributed network across all the nodes, pods, and containers and exposes the services across the outside world.
3.Pod: A pod is a group of containers that are deployed together on the same host. With the help of pods, we can deploy multiple dependent containers together so it acts as a wrapper around these containers so we can interact and manage these containers primarily through pods.
4.Docker: Docker is the containerization platform that is used to package your application and all its dependencies together in the form of containers to make sure that your application works seamlessly in any environment which can be development or test or production.