DEV Community

H
H

Posted on

Kubernetes Breakdown

Kubernetes Architecture — Complete Breakdown

etcd (pronounced et-see-dee) is the database that stores Kubernetes cluster state.

Think of Kubernetes as a distributed operating system for running containers across multiple computers.

Kubernetes has three major parts:

  1. Control Plane — the brain that makes decisions.
  2. Worker Nodes — the machines that actually run your applications.
  3. etcd — the database that remembers the cluster's state.

1. Kubernetes architecture diagram

Conceptual architecture of a Kubernetes cluster. The drawing simplifies communication paths and node components.

2. What exactly is etcd?

etcd Logo PNG Vector (AI, PDF, SVG) Free Download

etcd = Distributed Key-Value Database

It stores cluster configuration and state, such as Pods, Deployments, Services, Nodes and Secrets.

Imagine you tell Kubernetes:

I want three replicas of my Node.js application running.

Kubernetes must remember that you requested three replicas even if machines restart.

etcd stores the desired state and recorded cluster objects.

For example, conceptually:

/registry/deployments/default/my-app
    desired replicas: 3

/registry/pods/default/my-app-xyz
    node: worker-1

/registry/services/default/my-app
    port: 80
Enter fullscreen mode Exit fullscreen mode

These are illustrative representations, not the full underlying stored data.

Why etcd is important

  • Persistent storage: Cluster state survives process restarts.
  • Distributed consensus: Uses Raft to maintain agreement among etcd members.
  • Consistency: Provides strongly consistent operations.
  • High availability: Commonly deployed as a three- or five-member cluster.
  • Watches: Allows the API server to observe changes efficiently.

The important detail is that Kubernetes components generally interact with etcd through the API server, rather than reading or modifying etcd directly.

3. All Kubernetes components explained

Control Plane — the brain

Component What it does
API Server Entry point for Kubernetes. Validates requests and exposes the Kubernetes API.
etcd Stores persistent cluster state.
Scheduler Decides which node should run a new Pod.
Controller Manager Continuously checks and corrects differences between desired and actual state.
Cloud Controller Manager Connects Kubernetes with cloud infrastructure such as AWS or Google Cloud. Optional.

Worker Node — the execution layer

Component What it does
Kubelet Node agent responsible for making sure assigned Pods are running.
containerd Common container runtime that manages containers and images.
runc Low-level OCI runtime that creates containers using Linux features.
kube-proxy Implements Kubernetes Service networking rules. Optional when replaced by another implementation.
CNI Plugin Provides Pod networking. Examples: Cilium, Calico.
Pods Smallest deployable Kubernetes units, containing one or more containers.

These are the components described by the official Kubernetes architecture documentation.

image

Kubernetes+1

4. What happens when you deploy an application?

Suppose you execute:

kubectl create deployment my-app \
  --image=nginx --replicas=3
Enter fullscreen mode Exit fullscreen mode
  1. kubectl sends a request to the API Server

The request asks Kubernetes to create a Deployment with three replicas.

  1. API Server stores the Deployment in etcd

Kubernetes now remembers your desired configuration.

  1. Deployment and ReplicaSet controllers react

The controllers create the ReplicaSet and the three required Pod objects.

  1. Scheduler selects nodes

It checks resources and scheduling constraints, then assigns the Pods to suitable worker nodes.

  1. Kubelet starts the Pods

The kubelet on each selected node asks its container runtime to create the required containers.

  1. Container runtime launches the containers

containerd may use runc to create isolated Linux processes.

  1. Kubernetes continuously reconciles state

If a Pod disappears, the appropriate controller works to replace it and restore the desired replica count.

5. Interactive example: How reconciliation works

Change the desired number of replicas and simulate a Pod failure.

Deployment: my-app

Healthy

Desired state (etcd)

3 Pods

Actual state (running)

3 Pods

Desired replicas

3

Actual running Pods

Pod

Pod

Pod

Top comments (0)