How Kubernetes works? Explain each components with Short Summary
Kubernetes Essential Components
Kubernetes initially developed by Google and now an Open source project in CNCF. It has following major components
- Kubernetes Master
- Kubernetes Worker aka Minion aka Node
- Workstation usage – Kubectl
It is the control plane of the cluster – it receives request for the desired state of the cluster and also the current state from the workers’ agent and is responsible to schedule workloads aka containers accordingly.
Normally kept as replica of 3 to manage the failure of 1 master to maintain the cluster. It too is a worker in the sense has the same set of software in workers so that it can communicate with them.
It consists of :-
- API server – runs continuously and accepts in JSON or YAML form or via kubectl commands the K8s objects needed – i.e. services/ pods / containers within each pod or their replicas to keep etc.
- etcd – Key/Value Pair storage – Keeps request – plus cluster state info. Its the “brain” or key storage area of the cluster
- Controller Manager – Its a continuously running process that checks the current state of cluster components like pods etc and reports back to the api-server.
- Scheduler – On command by api server it places the workload of container on given node
Kubernetes Minion aka Slave
Consists of –
- Kubelet – Its an agent that runs on each node & talks to apiserver to get info of what pod to instantiate with its specifications of containers within it like image details etc
- Container Engine (Docker/rkt) – Run time that actually creates, runs the containers
- Kube proxy – It too is present on each node and manages the IP addresses of each pod in a node and updates iptables
Its a tool or utility to talk to the cluster as a user – and is a way we can monitor the cluster or deploy on cluster without UI