Kubernetes : Core Concepts

Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. It comes under CNCF(Cloud Native Computing Foundation).

Kubernetes basic cluster architecture consist of :-

Master Node :

  • ECTD cluster

  • kube-apiserver

  • kube-scheduler

  • Kube Controller Manager

Worker Node:

  • kubelet

  • Pod -> container

  • Kube-proxy

So, lets discuss about each of these components of Kubernetes one by one

ECTD (“/etc;” “d” stands for “distributed.”) :

It is an open source distributed key-value store which hold and manages the critical information that distributed systems need to keep running. Most notably, it manages the configuration data, state data, and metadata for Kubernetes, the popular container orchestration platform.

You can also create etcd cluster so that you can store the information in multiple cluster which gives various benefits such as :- High Availability, Consistency, Fault Tolerance, Scalability, Service Discovery and Configuration Management etc.

Kube-apiserver

It is the primary component of the K8s architecture. Which is responsible for authenticating, validating requests, retrieving and updating data in etcd Key value store. It is the only component which interacts directly to the ETCD datastore.

Also, kube-apiserver is designed to scale horizontally-that is, it scales by deploying more instances and It's a common misconception that there can only be one instance of the kube-apiserver in a Kubernetes cluster. In fact, Kubernetes is designed to be highly available, and running multiple instances of the kube-apiserver is a standard practice for production-grade clusters.

Kube Controller Manager

In K8s, a controller is a control loop that watches the shared state of the cluster through the apiserver and makes changes attempting to move the current state towards the desired state.

The Controller Manager does not directly modify resources in the Kubernetes cluster. Instead, it manages multiple controllers responsible for specific activities—including replication controllers, endpoint controllers, namespace controllers, and service account controllers. And these controllers tries to move the current cluster state closer to the desired state.

Kube scheduler

The scheduler is a control plane process which assigns Pods to Nodes. The scheduler determines which Nodes are valid placements for each Pod in the scheduling queue according to the constraints and available resources. The scheduler then ranks each valid Node and binds the Pod to a suitable Node.

Kubelet

A kubelet is a critical component within Kubernetes architecture. It acts as an agent responsible for managing the lifecycle of containers, ensuring that they are running as expected according to the specifications provided by the Kubernetes control plane.

The kubelet continuously monitors the state of the containers in each Pod and reports the status back to the Kubernetes control plane.

Kubelet does various tasks such as :

  • Pod Management

  • Communication with the API Server

  • Health Monitoring

  • Container Runtime Interface (CRI)

  • Volume Management

  • Node Resource Management

  • Handling of Pod Specifications

  • Managing Node Labels and Taints

Kube-proxy

It is responsible for facilitating communication between services and pods. In Kubernetes, Services are an abstraction that define a logical set of Pods and a policy by which to access them. Services allow Pods to communicate with each other or with external clients without needing to know the IP addresses of individual Pods.So, kube-proxy is responsible for implementing the networking rules that enable this communication. It ensures that traffic destined for a Service is correctly routed to one of the Pods backing that Service.

Did you find this article valuable?

Support Saurabh's blog by becoming a sponsor. Any amount is appreciated!