Kahibaro
Discord Login Register

Kubernetes architecture

High-level view of Kubernetes architecture

Kubernetes is built as a distributed control system that manages containers across many machines. At a high level, the architecture is split into two main logical parts:

All interaction with the cluster—whether from users, automation, or internal components—goes through the Kubernetes API. Everything else in the system reacts to the desired state stored in this API.

You’ll later see the components of the control plane and worker nodes in their own chapters; here we focus on how they fit together and why the architecture looks the way it does.

Logical vs. physical architecture

It helps to separate two perspectives:

In small demo clusters, control plane and worker roles may live on the same machine. In production, they are usually separated and the control plane is hardened.

The Kubernetes API as the core

At the center of the architecture is the Kubernetes API server and its data store:

Conceptually:

  1. A user (or CI system) sends a desired state, like “run 3 replicas of this application,” to the API.
  2. The API server validates, stores, and exposes this state.
  3. Controllers and the scheduler watch this state and make decisions (where to run pods, how to restart them, etc.).
  4. Node agents (kubelets) ensure the containers actually run as described.

This “API-centric” architecture is why Kubernetes is easily extensible and why tools like kubectl, CI/CD systems, and operators can all integrate in a consistent way.

Desired state and reconciliation loop

Kubernetes architecture is built around a control loop pattern:

Examples of reconciliation loops:

Key points:

Control plane vs. data plane

Kubernetes uses a common architectural split:

Design consequences:

Cluster topology and components at a glance

A typical production cluster looks roughly like this:

The exact implementation details are deferred to the “Control plane components” and “Worker node components” chapters, but the architectural point is: every piece either provides or consumes the API, stores cluster state, or runs containers.

Networking and service abstraction in the architecture

Kubernetes’ architecture assumes a specific networking model:

Within this architecture, Kubernetes provides:

Architecturally, this means:

While detailed networking is covered elsewhere, the important architectural takeaway is that networking is implemented as pluggable components attached to the nodes, not hard-coded into the core control plane.

Storage and state in the architecture

From an architectural standpoint, there are two kinds of state:

  1. Cluster configuration and metadata state
    • Stored in a distributed key–value store behind the API server.
    • Contains API objects and configuration.
    • Critical to the control plane; typically kept on control plane nodes.
  2. Application data (persistent volumes)
    • Provided by external storage systems through volume plugins and storage classes.
    • Mounted into pods via the node’s kubelet and container runtime.
    • Architecturally separate from the control plane store, to avoid mixing application data and cluster metadata.

This separation allows you to back up/restore the control plane independently of bulk application data and plug in different storage solutions without changing the core architecture.

Extensibility in the Kubernetes architecture

The architecture is designed to be extensible without modifying the core:

Architecturally:

Multi-cluster and higher-level control

While Kubernetes describes the architecture of a single cluster, the same patterns scale outward:

For this course, focus on understanding one cluster’s architecture well; later topics such as hybrid workflows and managed OpenShift will build directly on these principles.

Views: 13

Comments

Please login to add a comment.

Don't have an account? Register now!