How Kubernetes works? Explain each components with Short Summary

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Kubernetes Essential Components

Kubernetes initially developed by Google and now an Open source project in CNCF. It has following major components

  1. Kubernetes Master
  2. Kubernetes Worker aka Minion aka Node
  3. Workstation usage – Kubectl

Kubernetes Master

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 :-

  1. 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.
  2. etcd – Key/Value Pair storage – Keeps request – plus cluster state info. Its the “brain” or key storage area of the cluster
  3. 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.
  4. Scheduler – On command by api server it places the workload of container on given node

Kubernetes Minion aka Slave

Consists of –

  1. 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
  2. Container Engine (Docker/rkt) – Run time that actually creates, runs the containers
  3. Kube proxy – It too is present on each node and manages the IP addresses of each pod in a node and updates iptables

Kubectl

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