How Kubernetes Works

The Backend Grip
2 min readJun 22, 2024

--

kubernetes architecture — photo credit: kubernetes-website

The architecture of Kubernetes consists of several key components:

  1. Cluster: This is a group of Computing Nodes or Worker Machines that manages and run containerised applications
  2. Master Node: This is the Control Plane of Kubernetes and it is responsible for managing the overall state of the system
  3. Worker Node: This is the node where containerised applications are deployed and run

The Control Plane receives information such as cluster activity events, internal and external requests etc. and moves the cluster resources from their current state to the desired state

There are five components in the Control Plane:

  1. Kube-API-Server: This is the central interface for interacting with the Kubernetes system. It provides endpoints for managing resources (e.g Pods, Services etc.) in the system
  2. Scheduler: This component is responsible for assigning pods to worker nodes
  3. Etcd: This is a distributed key-value store that stores current and desired state of resources in the Kubernetes Cluster
  4. Controller Manager: This component is responsible for managing various controllers that ensure the desired state of the Kubernetes Cluster is maintained
  5. Cloud Control Manager: This component interacts with cloud specific APIs and resources

A Worker Node can be a virtual or a physical machine depending on the cluster, each Worker Node is managed by the Control Plane. The Worker Node consists of three main components:

  1. Kubelet: This component ensures that the pods in the node and the node itself are in the desired states by communicating with the Control Plane
  2. Kube-Proxy: This component manages the networking of the pods in the node
  3. Container Runtime: This component is where all the pods in the node are running

Using Kubernetes provides a lot of benefits including:

  • Horizontal scaling — Kubernetes can automatically scale up and down your applications based on demand
  • Self healing — Kubernetes monitors your resources, automatically recovers from failures and ensures desired state of the system is attained
  • Storage orchestration — Automatically mount the storage system of your choice
  • Rollouts and rollbacks — Kubernetes can perform rolling updates and rollbacks to ensure changes to the system are made smoothly and without downtime
  • Secrets and configuration management — Deploy and update environment secrets without exposing them in your stack
  • Service discovery and load balancing — Kubernetes gives pods their own IP addresses and can load balance across multiple pods with a single DNS name

please hit the follow button if you like this article and want to get more articles like this

--

--

The Backend Grip

TheBackendGrip is a community for backend programmers, our goal is to share useful content and create networking opportunities for our members