Kubernetes Architecture

Astha Upadhyay
4 min readJul 26, 2021

--

A container orchestrator framework can create, manage, configure thousands of containers on a set of distributed servers while preserving the connectivity and reachability of these containers. Multiple tools emerged within the landscape in the past years to provide these capabilities, including Docker Swarm, Apache Mesos, CoreOS Fleet, and many more.

Photo by Safar Safarov on Unsplash

However, Kubernetes took the lead in defining how to run containerized workloads on a distributed amount of machines.

Kubernetes is widely adopted in the industry today, with most organizations using it in production. Kubernetes currently is a graduated CNCF project, which highlights its maturity and reported success from end-user companies.

What is Kubernetes?

Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem.

Kubernetes provides :

Portability: It is a highly portable tool. This is due to its open-source nature and vendor agnosticism.

Scalability: Kubernetes has in-build resources, such as HPA (Horizontal Pod Autoscaler), to determine the required amount of replicas for a service. Elasticity is a core feature that is highly automated within Kubernetes.

Resilience: Kubernetes uses functionalities like ReplicaSet, readiness, and liveness probes to handle most of the container failures, enabling powerful self-healing capability.

Service discovery: Kubernetes provide cluster-level DNS (or Domain Name System), which simplifies the accessibility of workloads within the cluster.

Extensibility: Kubernetes is a highly extensible mechanism that uses the building-block principle.

The operational cost of the container: Operational cost refers to the efficiency of resource consumption within a Kubernetes cluster, such as CPU and memory. Kubernetes has a powerful scheduling mechanism that places an application on the node with sufficient resources to ensure the successful execution of the service. As a result, most of the available infrastructure resources are allocated on-demand.

Kubernetes is not a traditional, all-inclusive PaaS (Platform as a Service) system. Since Kubernetes operates at the container level rather than at the hardware level, it provides some generally applicable features common to PaaS offerings, such as deployment, scaling, load balancing, and lets users integrate their logging, monitoring, and alerting solutions.

Kubernetes architecture, composed of control and data planes.

A Kubernetes cluster is composed of a collection of distributed physical or virtual servers. These are called nodes.

Nodes are categorized into 2 main types: master and worker nodes.

The components installed on a node, determine the functionality of a node, and identifies it as a master or worker node.

The suite of master nodes, represents the control plane, while the collection of worker nodes constructs the data plane.

Control Plane

The control plane consists of components that make global decisions about the cluster. These components are the:

  • kube-apiserver : the nucleus of the cluster that exposes the Kubernetes API, and handles and triggers any operations within the cluster
  • kube-scheduler : the mechanism that places the new workloads on a node with sufficient satisfactory resource requirements
  • kube-controller-manager : the component that handles controller processes. It ensures that the desired configuration is propagated to resources
  • etcd : the key-value store, used for backs-up and keeping manifests for the entire cluster

There are two additional components on the control plane, they are kubelet and k-proxy. These two are special and important as they are installed on all node.

Data Plane

The data plane consists of the compute used to host workloads. The components installed on a worker node are the:

  • kubelet : the agent that runs on every node and notifies the kube- apiserver that this node is part of the cluster
  • kube-proxy : a network proxy that ensures the reachability and accessibility of workloads places on this specific node

--

--