Kubernetes is a cluster of systems categorized by 2 roles:
- One or more control plane nodes
- One or more worker nodes
Control Plane Node
This is the brain of a k8s cluster, it manages everything that happens in the cluster. Users interact with it using tools like the CLI, web dashboard, or API. Keeping the control plane running is critical: if it goes down, services can stop and cause business issues. To prevent this, multiple control plane nodes can be set up in High-Availability (HA) mode, so if one fails, others take over. The cluster’s config is saved in a special key-value database. This DB stores only the cluster’s setup, not any app data. It can be hosted on the same control plane node (stacked) or separately (external). The stacked setup is simpler, while the external setup adds protection but needs more hardware and costs more.
Control Plane Node Components
- API Server
- Scheduler
- Controller managers
- Key-value data store
Worker Node
A worker node is where the actual applications run in a Kubernetes cluster. These apps are packaged into containers, which are grouped inside Pods. The control plane decides which worker node should run each Pod.
Pods get the CPU, memory, storage, and networking they need from the worker node they’re on. A Pod is the smallest unit Kubernetes manages, it can contain one or more containers, and Kubernetes treats the whole Pod as a single unit when starting, stopping, or moving it.
In clusters with multiple worker nodes, users access the applications directly through the worker nodes. This traffic does not go through the control plane node.
Worker Node Components
- Container runtime
- Node agent, kubelet
- kubelet, CRI shims
- Proxy, kube-proxy
- Add-ons