# Cluster Architecture — Kubernetes

Source: https://www.skillbyai.com/en/kubernetes/i-arch

> Control plane and nodes.

## Who does what

The **control plane** holds the cluster state and makes decisions: the **API server** (the front door every tool talks to), **etcd** (the key-value store holding all objects), the **scheduler** (chooses nodes for new pods) and **controller managers** (loops that reconcile Deployments, ReplicaSets, Jobs and more). Each **node** runs the **kubelet** (starts and monitors containers via a container runtime such as containerd) and a network proxy component. Everything is driven through the API: kubectl, CI tools and controllers all read and write objects there.

## Components at a glance

Control plane on top, nodes below.

```text
control plane
  kube-apiserver           REST API; authentication, authorisation, admission
  etcd                     stores every object (desired + observed state)
  kube-scheduler           assigns pending pods to nodes
  kube-controller-manager  reconciliation loops (Deployments, ReplicaSets, Jobs, ...)

every node
  kubelet                  runs pods via the container runtime, reports status, runs probes
  container runtime        containerd / CRI-O
  kube-proxy (or CNI)      implements Service networking
```

## Back up etcd (or trust your provider)

etcd is the cluster's memory; with a managed service, know the provider's backup and recovery guarantees.

**Quiz:** Which component decides which node a new pod runs on?

- [x] The scheduler
- [ ] etcd
- [ ] The kubelet
- [ ] The container image

*Answer:* The scheduler. Scheduling is a control-plane decision.
