Architecture Overview

Difficulty: Intermediate

Question

What are the main components of the Kubernetes Control Plane and Worker Nodes?

Answer

Kubernetes follows a master-slave architecture.

**Control Plane (Master)**: 1. **kube-apiserver**: The front end for the Kubernetes control plane. It's the central hub for all communication. 2. **etcd**: Consistent and highly-available key-value store used for all cluster data. 3. **kube-scheduler**: Watches for newly created Pods and selects a node for them to run on. 4. **kube-controller-manager**: Runs controller processes (Node controller, Job controller, etc.). 5. **cloud-controller-manager**: Integrates with your cloud provider (AWS/GCP/Azure).

**Worker Nodes**: 1. **kubelet**: An agent that runs on each node. It ensures that containers are running in a Pod. 2. **kube-proxy**: Maintains network rules on nodes. These rules allow network communication to your Pods. 3. **Container Runtime**: The software responsible for running containers (e.g., Docker, containerd).

Code examples

Checking component health

# View nodes and their status
kubectl get nodes

# View control plane components
kubectl get pods -n kube-system

# Summary of cluster health
kubectl cluster-info

These commands show the state of the infrastructure that manages your applications.

Key points

Concepts covered

Control Plane, Worker Nodes, kube-apiserver, etcd, Kubelet