Kubernetes Architecture

Chaithanya Kopparthi
3 min readJun 18, 2021

--

Since the rise of containers, managing the containerized application has not been an easy task. There are several challenges while managing the containerized application like scaling, maintaining traffic between micro-services, auto-healing.

So Kubernetes is a container orchestration engine, that allows managing deploying, and maintaining the containerized application. It makes the management of containerized applications very efficient.

Kubernetes follows client-server architecture where the server is called the control-plane node and the client is called the Kubernetes nodes.

Control Plane:

The Control-plane node is the master node where it makes all the decisions for the configuration given to the cluster.

It consists of four components.

  • Kube-api server
  • Kube-controller-manager(CMM)
  • Kube-scheduler
  • ETCD

Kube-api server:

Kube-api server is the frontend to the kubernetes application, it allows communication between the users and the kubernetes components. It is designed to run across multiple systems so that the control-plane nods can be scaled to avoid single-point failure.

Kube-controller-manager:

Kube-controller-manager a package of the group of controllers in the kubernetes control-plane node. A controller is a non-terminating loop that checks the state of the objects in the kubernetes cluster through the kube-api server and always keeps it in the desired state. There are multiple controllers in CCM below are some of the controllers.

Node Controller: Keeps track of kubernetes nodes and responds to the kubernetes node’s events.

Endpoints Controller: This is responsible for updating the Endpoint Objects in kubernetes.

Replication Controller: Keeps track of the number of replicas in a deployment or statefulset and if a pod gets killed for any reason this creates a new pod.

service accounts Controller: Keeps track of the service account and creates the default service accounts required for the kubernetes cluster.

Kube-scheduler:

Kube Scheduler tracks the newly created pods, assigns a node for the pods to run. The scheduling is based on many parameters like resources of the kubernetes nodes, pod affinity, persistent volume placement, taints/tolerations on the nodes.

ETCD:

ETCD is a key-value data store and heart of the kubernetes cluster, it stores all the metadata related to the objects in the kubernetes. In an event of restart or failure, the kube-api service checks the data in etcd and recovers the data in the cluster.

Cloud Controller Manager:

Cloud Controller manager is used when the kubernetes cluster is hosted in cloud environments, it talks to different cloud APIs and manages the resources that interact with the kubernetes cluster.

Kubernetes Node:

Kubernetes node is the place where all the workloads run, it has three components.

  • Kube-proxy
  • Kubelet
  • Container Runtime

Kube-proxy:

This component runs on all the kubernetes nodes, manages the routes required for the kubernetes service objects. kube-proxy also enables the communication from pods to outside/inside the kubernetes cluster by creating the network rules on the kubernetes nodes.

Kubelet:

Kublet is an agent that talks to container runtime and creates and manages containers provided via Podspec to the kubernetes clusters. This will only manage the containers that are created using the Kubernetes.

Container Runtime:

Container Runtime is a tool that is used to create and manage containers. Kubernetes supports multiple container-runtimes like Docker, Rkt, and containerd.

--

--