Architecture Overview

Difficulty: Intermediate

Question

What are the main components of the Kubernetes control plane and the worker nodes, and how do they work together when you create a Deployment?

Answer

A Kubernetes cluster has a control plane that stores and reconciles the desired state, and worker nodes that actually run your containers. The control plane is made of kube-apiserver, etcd, kube-scheduler and kube-controller-manager (plus cloud-controller-manager on cloud clusters). Every worker node runs a kubelet, a container runtime such as containerd, and usually kube-proxy.

Control plane components and what each one owns

  • kube-apiserver: the front door. Every client (kubectl, controllers, kubelets, CI pipelines) talks to the cluster only through its REST API. It authenticates, authorizes (RBAC), runs admission controllers, validates the object, and persists it. It is stateless, so you scale it horizontally behind a load balancer.
  • etcd: a consistent, distributed key-value store using the Raft consensus algorithm. It is the single source of truth for all cluster state. Only the API server talks to etcd directly. Run an odd number of members (3 or 5) so a quorum survives failures, and back it up with etcdctl snapshot save.
  • kube-scheduler: watches for Pods with no spec.nodeName and picks a node. It first filters nodes that cannot fit the Pod (resources, taints, affinity, volume topology), then scores the rest and binds the Pod to the best one.
  • kube-controller-manager: runs the built-in control loops: Deployment, ReplicaSet, Node, Job, EndpointSlice, ServiceAccount and more. Each loop compares desired state with actual state and acts to close the gap.
  • cloud-controller-manager: talks to the cloud provider API to create load balancers, attach routes and detect deleted VMs. It keeps cloud-specific code out of the core.

Worker node components

  • kubelet: the node agent. It watches the API server for Pods bound to its node, asks the container runtime to start them through the Container Runtime Interface (CRI), runs probes, mounts volumes and reports status back.
  • Container runtime: containerd or CRI-O. Docker Engine was removed as a direct runtime in v1.24 (the dockershim removal), though images built with Docker still run fine because they are OCI images.
  • kube-proxy: programs iptables or IPVS rules (nftables mode is also available in recent versions) so that traffic to a Service IP reaches a healthy backing Pod. Some CNI plugins like Cilium replace kube-proxy entirely using eBPF.
  • CNI plugin: Calico, Cilium, Flannel or the cloud's own plugin gives every Pod a routable IP.

What happens when you run kubectl apply on a Deployment

  1. kubectl sends the manifest to the API server, which authenticates, authorizes and admits it, then writes it to etcd.
  2. The Deployment controller notices the new Deployment and creates a ReplicaSet.
  3. The ReplicaSet controller creates the required number of Pod objects, all without a node.
  4. The scheduler sees unscheduled Pods and binds each one to a node.
  5. The kubelet on that node sees the binding, pulls the image, starts the containers and reports Running.

No component calls another directly. They all watch the API server and react, which is why Kubernetes is described as a set of independent, level-triggered control loops.

Why this design matters in production

Because state lives only in etcd and everything else reconciles toward it, the cluster self-heals: if a node dies, the Node controller marks it NotReady, its Pods are evicted after a timeout, and the ReplicaSet controller recreates them elsewhere. Managed services like EKS, GKE and AKS run the control plane for you, so in those setups you mostly operate the worker nodes. A common interview mistake is saying "the master node runs the containers"; the control plane decides, the kubelet executes.

From kubectl apply to a running Pod. Each component watches the API server and reacts; none of them call each other directly.
  1. kubectl apply: Sends the Deployment manifest over HTTPS.
  2. kube-apiserver + etcd: Validates, admits and stores the desired state.
  3. Controller manager: Creates a ReplicaSet, which creates Pod objects.
  4. kube-scheduler: Filters and scores nodes, then binds each Pod.
  5. kubelet + containerd: Pulls the image and starts the containers.

Code examples

Inspecting the control plane and nodes

# List nodes with roles, versions and container runtime
kubectl get nodes -o wide

# On kubeadm clusters the control plane runs as static Pods here
kubectl get pods -n kube-system -o wide

# Check API server health endpoints
kubectl get --raw='/readyz?verbose'

# See which runtime the kubelet uses on each node
kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.nodeInfo.containerRuntimeVersion}{"\n"}{end}'

On kubeadm clusters, etcd, the API server, scheduler and controller manager show up as Pods in kube-system. On EKS or GKE they are hidden because the provider manages them.

Key points

  • Only kube-apiserver reads and writes etcd; every other component goes through the API.
  • The scheduler only chooses a node; the kubelet on that node actually starts the containers.
  • etcd needs an odd number of members for quorum: 3 tolerates 1 failure, 5 tolerates 2.
  • Docker Engine is no longer a supported runtime since v1.24; containerd and CRI-O are the norm.
  • Controllers are level-triggered reconciliation loops: observe, compare with desired state, act.

Common follow-up questions

  • What happens to running Pods if the API server goes down?
  • How does the scheduler decide which node a Pod goes to?
  • Why does etcd need an odd number of members?
  • What does kube-proxy actually do, and can a cluster run without it?

Interview tips

  • Walk through the kubectl apply flow step by step; it proves you understand how the pieces interact, not just their names.
  • Mention that running Pods keep working if the control plane is down, because the kubelet and runtime keep them alive; only changes and rescheduling stop.
  • Say 'control plane' rather than 'master'; the term was officially renamed and interviewers notice.

Concepts covered

Control Plane, kube-apiserver, etcd, kube-scheduler, Kubelet, kube-proxy

More Kubernetes & Orchestration questions