Kubernetes Series: Architecture Deep Dive

Endang Suwarna | Mar 5, 2024 min read

Kubernetes Architecture

In the previous article, we introduced Kubernetes basics. Now let’s explore the architecture in detail.

Control Plane Components

kube-apiserver

The API server is the front-end for the Kubernetes control plane. All communication with the cluster goes through the API server.

etcd

etcd is a distributed key-value store that stores all cluster data. It’s the only place Kubernetes stores state.

kube-scheduler

The scheduler watches for newly created Pods with no assigned node, and selects a node for them to run on.

kube-controller-manager

Runs controller processes. Each controller is a non-terminating loop that watches the state of the cluster.

Node Components

kubelet

An agent that runs on each node. It ensures containers are running in a Pod.

kube-proxy

Maintains network rules on nodes that allow network communication to Pods.

Container Runtime

Software responsible for running containers (e.g., containerd, CRI-O).

How They Work Together

┌─────────────────────────────────────────────────────────────┐
│                     Control Plane                           │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────┐  │
│  │ API Server   │  │ Scheduler    │  │ Controller Mgr  │  │
│  └──────┬───────┘  └──────────────┘  └──────────────────┘  │
│         │                                                   │
│  ┌──────┴───────┐                                          │
│  │    etcd      │                                          │
│  └──────────────┘                                          │
└─────────────────────────────────────────────────────────────┘
                    │
         ┌──────────┼──────────┐
         ▼          ▼          ▼
    ┌────────┐ ┌────────┐ ┌────────┐
    │ Node 1 │ │ Node 2 │ │ Node 3 │
    │ kubelet│ │ kubelet│ │ kubelet│
    │ proxy  │ │ proxy  │ │ proxy  │
    └────────┘ └────────┘ └────────┘

Next Steps

In the next article, we’ll explore Kubernetes networking and how Pods communicate with each other.

Part 3: Kubernetes Networking coming soon!