This document provides an overview of the Kubernetes architecture, including its components and how they interact to manage containerized applications.
This document explores the architecture of Kubernetes, describing the structure and function of clusters, the control plane, worker nodes, and their core components. It covers how Kubernetes manages containerized applications, maintains desired state, and integrates with cloud providers.
A Kubernetes deployment is called a cluster, consisting of a control plane (master node) and one or more worker nodes. The control plane manages the cluster state, making decisions and responding to events, while worker nodes run containerized applications.
{{< kroki _type=“mermaid”_name=“diagrams/course/09/02m/004/01-k8s-architecture.mmd” >}}
The control plane is responsible for maintaining the desired state of the cluster. It makes global decisions, such as scheduling workloads and responding to cluster events. The main components are:
| Component | Description |
|---|---|
| API Server (kube-apiserver) | Serves as the front-end for the control plane, exposing the Kubernetes API for communication |
| etcd | Distributed key-value store holding all cluster data and configuration |
| Scheduler (kube-scheduler) | Assigns newly created pods to nodes based on resource availability and scheduling policies |
| Controller Manager | Runs controller processes to monitor and reconcile cluster state |
| Cloud Controller Manager | Integrates with cloud provider APIs, enabling cloud-agnostic operations |
How to pronounce “etcd”etcd is pronounced as “et-see-dee”. It stands for “eternal consistency and distributed” but also pronounced as
E-T-C-D. It is a cluster memory which stores the desired state of the cluster, such as configurations and metadata.
The API server is horizontally scalable, allowing multiple instances to balance traffic. Etcd stores the desired and actual state, ensuring consistency. The scheduler selects optimal nodes for workloads, while controller managers ensure the cluster state matches the intended configuration.
Worker nodes are the machines (virtual or physical) that run user applications. Each node is managed by the control plane and contains essential services for running containers.
| Component | Description |
|---|---|
| Kubelet | Communicates with the API server, manages pod lifecycle, and reports pod status |
| Container Runtime | Downloads images and runs containers; supports pluggable runtimes (e.g., Docker, Podman) |
| Kube-proxy | Maintains network rules for pod communication within and outside the cluster |
| Pods | Smallest deployable unit, containing one or more containers sharing resources |
The kubelet ensures pods are running as specified and reports their health. The container runtime handles image management and container execution. Kube-proxy manages networking, enabling communication between pods and external services.
Kubernetes uses a declarative model: the desired state is defined (e.g., via deployment configuration), and the control plane works to ensure the actual state matches. For example, when an application is deployed, the configuration is stored in etcd, and controllers act to create or update resources as needed.
{{< kroki _type=“mermaid”_name=“diagrams/course/09/02m/004/02-k8s-control-plane.mmd” >}}
The control plane acts like a thermostat, continuously monitoring and adjusting the cluster to maintain the specified state.
Kubernetes is designed to be cloud-agnostic. The cloud controller manager allows Kubernetes and cloud providers to evolve independently, supporting a wide range of infrastructures. Nodes are provisioned by the cloud provider and then managed by Kubernetes.
| Control Plane Components | Worker Node Components |
|---|---|
| API Server (kube-apiserver) | Kubelet |
| etcd | Container Runtime |
| Scheduler (kube-scheduler) | Kube-proxy |
| Controller Manager | Pods |
| Cloud Controller Manager | (not applicable) |
Kubernetes architecture separates cluster management (control plane) from application execution (worker nodes). The control plane ensures the cluster operates as intended, while worker nodes run containerized workloads. This modular design enables scalability, reliability, and cloud-agnostic deployment of modern applications.
(2) Kubelet is a component of the worker node, not the control plane.
| Component | Role |
|---|---|
| A. API Server | 1. Maintains network rules for pod communication |
| B. etcd | 2. Assigns pods to nodes |
| C. Scheduler | 3. Stores cluster data and configuration |
| D. Kubelet | 4. Exposes the Kubernetes API |
| E. Kube-proxy | 5. Manages pod lifecycle on worker nodes |
A-4, B-3, C-2, D-5, E-1.
The smallest deployable entity in Kubernetes is a pod, which can contain one or more containers.
True. Pods are the smallest deployable units in Kubernetes and may include one or more containers sharing resources.