How Kubernetes architecture actually holds a cluster together

    Kubernetes Architecture Explained: Components, Concepts & How It Works

    How Kubernetes architecture actually holds a cluster together

    A practical guide to control plane components, worker nodes, and the declarative loop that keeps your applications running.

    Understand Kubernetes architecture from the ground up

    Explore how Kubernetes components fit together and what that means for running containerised workloads at scale.

    Two layers that every Kubernetes cluster shares

    A Kubernetes cluster is built from two distinct layers: the control plane, which makes decisions about the cluster, and the worker nodes, which carry out those decisions by running your application workloads. Every cluster needs at least one worker node to run Pods, and in production the control plane itself typically spans multiple machines to provide fault tolerance and high availability.

    This separation of concerns is deliberate. The control plane never runs your application containers directly. Instead, it continuously watches the state of the cluster and acts to bring reality in line with what you have declared. Understanding this division is the first step toward understanding why Kubernetes behaves the way it does when nodes fail, when load spikes, or when you roll out a new version of an application.

    For a broader grounding in how software systems are structured, software architecture principles and patterns provide useful context.

    The control plane: four components, one source of truth

    The control plane hosts four core components, each with a precise responsibility.

    The API server (kube-apiserver) is the front door to the entire cluster. Every request, whether it comes from kubectl, from a controller, or from a kubelet on a worker node, passes through the API server. It authenticates, authorises, and validates each request before writing the resulting object to storage. Critically, only the API server is permitted to write to etcd; no other component communicates with etcd directly.

    etcd is a distributed key-value store and the sole stateful component in the control plane. Every object you create in the cluster, including Pods, Services, ConfigMaps, Secrets, and Deployments, is stored here. It is the single source of truth for the entire cluster.

    kube-scheduler watches for Pods that have not yet been assigned to a node and selects a suitable node for each one based on resource availability and constraints.

    kube-controller-manager runs a collection of controllers that continuously observe cluster state and act to reconcile it toward the desired state. The replication controller, the Deployment controller, the DaemonSet controller, and the node controller (which detects and responds to node failures) are all examples.

    Worker nodes: where application containers actually run

    Each worker node runs three components that together translate control plane decisions into running containers.

    The kubelet is the primary node agent. It watches the API server for Pods scheduled to its node, instructs the container runtime to pull the required images and start the containers, monitors container health, and reports status back to the API server. The kubelet is the link between the control plane's intentions and the containers that actually run on the machine.

    kube-proxy maintains network rules on the node that implement Kubernetes Services, allowing traffic to reach the correct Pods regardless of which node they are running on.

    The container runtime is the software that actually runs containers. Kubernetes supports any runtime that implements the Container Runtime Interface (CRI), including containerd and CRI-O. Containerd is now the most widely used runtime; Docker was used originally but support was discontinued from Kubernetes v1.20 onward.

    For a deeper look at how containers work before they reach Kubernetes, the complete guide to containerisation and Docker covers the fundamentals.

    The API server as the cluster's communication hub

    One of the most important architectural decisions in Kubernetes is that no component talks to another component directly. The scheduler does not talk to the kubelet. The controller manager does not talk to etcd. Every interaction flows through the API server.

    This design keeps the system auditable, consistent, and secure. Every state change is a validated write to etcd via the API server, and every component that needs to react to a change watches the API server for updates rather than polling other components. The result is a loosely coupled system where components can be restarted or replaced without breaking the coordination model.

    This is also why the API server is the first thing to diagnose when a cluster is behaving unexpectedly: if the API server is unavailable, the entire control loop stalls.

    Declarative configuration and the reconciliation loop

    Kubernetes does not ask you to start processes directly on servers. Instead, you describe the desired state of your system using resource definitions such as `Deployment`, `StatefulSet`, or `DaemonSet`. The control plane takes that declaration, decides where to place Pods, when to restart them, and how to react when nodes fail or capacity changes.

    This ongoing loop between the control plane and the worker nodes is the architectural core of Kubernetes. Controllers continuously compare the current state of the cluster against the desired state stored in etcd, and take corrective action whenever the two diverge. A node that disappears, a Pod that crashes, or a Deployment that is scaled up all trigger the same mechanism: a controller notices the gap and acts.

    This model maps well onto microservices architectures, where independent services need to be deployed, scaled, and recovered independently. Cloud management and optimisation practices build directly on this foundation.

    The scheduler does not talk to the kubelet, the controller manager does not talk to etcd: every interaction in a Kubernetes cluster flows through the API server, and that single constraint is what keeps the whole system consistent.

    How Kubernetes processes a workload, step by step

    1. 1

      Submit a declarative resource definition

      A developer or CI/CD pipeline sends a resource manifest, typically a YAML file describing a `Deployment`, to the API server using kubectl or a direct API call. The API server authenticates and authorises the request, validates the manifest, and writes the desired state to etcd. At this point no container has started yet; the cluster simply knows what you want.

    2. 2

      Scheduler assigns pods to nodes

      The kube-scheduler watches the API server for Pods that exist in etcd but have not yet been assigned to a node. For each unscheduled Pod, the scheduler evaluates available nodes against resource requests, affinity rules, and taints, then writes the chosen node assignment back to the API server, which stores it in etcd. The scheduler never contacts the node directly.

    3. 3

      Kubelet pulls images and starts containers

      The kubelet on the assigned node is continuously watching the API server. When it sees a Pod scheduled to its node, it instructs the container runtime (such as containerd) to pull the required images and start the containers. The kubelet then monitors container health and reports the Pod's status back to the API server.

    4. 4

      kube-proxy configures network rules

      As Pods come online, kube-proxy updates the network rules on each node so that Service traffic is correctly routed to the running Pod endpoints. This is how a Kubernetes Service provides a stable network address even as the underlying Pods are replaced or rescheduled.

    5. 5

      Controllers maintain desired state continuously

      Controllers in the controller manager continuously compare actual cluster state against the desired state in etcd. If a Pod crashes, the replication controller detects the shortfall and instructs the API server to create a replacement. If a node disappears, the node controller marks it as unavailable and the affected Pods are rescheduled. This loop runs indefinitely for the lifetime of the cluster.

    Benefits

    Single source of truth for cluster state

    etcd stores every object in the cluster as key-value pairs and is the only place cluster state is written. This means any component, on any node, can retrieve a consistent view of the cluster by querying the API server.

    Automatic workload recovery

    Controllers continuously compare actual state to desired state and act on any gap. A crashed Pod or a failed node triggers automatic rescheduling without requiring manual intervention, making the system self-healing by design.

    Loose coupling through the API server

    Because no component talks directly to another, individual components can be restarted, upgraded, or replaced without breaking coordination. All communication flows through the API server, keeping the system auditable and consistent.

    Declarative configuration reduces operational toil

    Describing desired state in manifests rather than issuing imperative commands means the cluster continuously works toward your specification. Rolling updates, scaling, and rollbacks are handled by controllers, not by manual scripts.

    Flexible container runtime support

    The Container Runtime Interface (CRI) means Kubernetes is not tied to a single runtime. Containerd and CRI-O are both supported, giving teams the ability to choose the runtime that fits their security and operational requirements.

    Kubernetes architecture in real deployment scenarios

    Migrating a monolith to microservices on Azure

    A business moving a legacy monolithic application to Azure Kubernetes Service breaks the application into independently deployable services, each packaged as a container. The control plane's scheduler places each service's Pods across nodes based on available resources, while the declarative Deployment manifests ensure the correct number of replicas are always running. Rolling updates can be applied to individual services without downtime, because the Deployment controller manages the transition. This is a common pattern in legacy modernisation projects where operational continuity is a hard requirement.

    Automatic recovery after a node failure in production

    In a production cluster running across multiple nodes, one node loses connectivity. The node controller in the controller manager detects the failure and marks the node as unavailable. Pods that were running on that node are rescheduled to healthy nodes by the scheduler, all without manual intervention. etcd retains the desired state throughout, so the control plane knows exactly how many replicas should exist and acts accordingly. This fault-tolerance behaviour is why production clusters are designed with cloud infrastructure architecture that spans multiple availability zones.

    CI/CD pipeline deploying a new application version

    A CI/CD pipeline builds a new container image, pushes it to a registry, and updates the Deployment manifest with the new image tag. The API server receives the updated manifest, writes it to etcd, and the Deployment controller begins a rolling update: it gradually replaces old Pods with new ones, checking readiness before proceeding. If the new version fails its health checks, the rollout can be halted and reversed. This workflow depends directly on understanding how the API server, etcd, and the Deployment controller interact.

    Running isolated workloads for multiple teams on one cluster

    A platform team uses Kubernetes namespaces and resource quotas to give separate development teams isolated environments within a single cluster. Each team submits their own Deployment and Service definitions; the scheduler places their Pods on available nodes without teams interfering with each other. kube-proxy ensures that Service discovery within each namespace works correctly, while the API server enforces access controls so that one team cannot modify another team's resources. This multi-tenant pattern is a common reason organisations invest in understanding Kubernetes architecture before scaling their platform.

    Kubernetes architecture explained: common questions

    Build your Kubernetes infrastructure on solid architectural foundations

    Kubernetes architecture is the foundation for everything that runs reliably at scale in a containerised environment. If your team is planning a migration to Azure Kubernetes Service, modernising a legacy platform, or simply needs experienced architects who work with Kubernetes day to day, Techfirst can help you design and execute it correctly from the start.