Skip to main content
Kubernetes clusters must be resilient not only at the application level (ReplicaSets, Deployments, Services) but also at the control-plane level. If the master node (control plane) becomes unavailable, worker nodes will continue to run existing Pods, but cluster-level actions that require the control plane—such as recreating failed Pods, scheduling new Pods, or modifying cluster state—will stop working. To avoid this single point of failure, production clusters should run multiple master nodes in a high-availability (HA) configuration. This guide explains how HA works for control-plane components (kube-apiserver, controller-manager, scheduler, and etcd), the common etcd deployment topologies, and best practices to design a resilient control plane.

What happens when the master fails?

  • Running Pods on worker nodes continue to serve traffic as long as those nodes and containers are healthy.
  • Cluster-level operations that require control-plane coordination (for example, a ReplicaSet creating replacement Pods) require the kube-apiserver, controller-manager, and scheduler. If the master is down, no new Pods will be scheduled or recreated.
  • External management via kubectl or API clients is not possible if the kube-apiserver is unreachable.
For these reasons, a highly available control plane is essential in production.

Master node components — recap

A Kubernetes master node hosts the control-plane components:
  • kube-apiserver (API server)
  • kube-controller-manager (controller-manager)
  • kube-scheduler (scheduler)
  • etcd (cluster datastore)
In a multi-master HA setup, those components run on multiple master nodes. How they operate across nodes differs by component type.

Component behavior in HA

kube-apiserver — active-active

The API server is stateless and can run in an active-active configuration. Clients (kubectl, controllers, other components) should talk to a single virtual endpoint — typically a load balancer — instead of individual master IPs. Example endpoints you might see:
Recommended setup: put an L4/L7 load balancer (for example, NGINX or HAProxy) in front of all kube-apiserver instances, and point clients to the load balancer endpoint.

controller-manager and kube-scheduler — leader election (active-standby)

Both controller-manager and scheduler run control loops that reconcile cluster state. To avoid duplicate actions, they use leader election:
  • Multiple instances run, but only the leader performs active work.
  • Leader election is enabled by default (--leader-elect=true).
  • Leader election uses a Lease object (or previously Endpoints) in the API to coordinate leadership.
Example default leader-election options (controller-manager):
  • --leader-elect (default: true) enables the mechanism.
  • --leader-elect-lease-duration sets the total lease length.
  • --leader-elect-renew-deadline defines how long the leader will try to renew before giving up.
  • --leader-elect-retry-period sets retry frequency for contenders.
The scheduler uses the same leader-election pattern and flags.

etcd topologies

etcd is the persistent data store for Kubernetes. There are two common topologies for running etcd in Kubernetes clusters:
  1. Stacked control-plane topology — etcd runs on the same machines as the control-plane components (API server, controller-manager, scheduler).
  2. External etcd topology — etcd runs on a separate set of dedicated nodes.
Stacked topology is easier to provision and requires fewer servers, but it couples etcd and control-plane availability: losing a control-plane node may also remove an etcd member. External etcd isolates the datastore on separate hosts and reduces the blast radius at the cost of additional complexity and servers.
A slide titled "Stacked Topology" showing two Kubernetes master nodes side-by-side, each containing etcd, API Server, Controller-Manager, and Scheduler. A short pros/cons list on the right notes it's easier to set up/manage and uses fewer servers, but has higher risk during failures.
Remember: the API server is the only control-plane component that talks directly to etcd. The kube-apiserver must be configured with the addresses of the etcd cluster members so it can read/write cluster state. API servers typically list multiple etcd endpoints to tolerate node failures. Example systemd ExecStart snippet for kube-apiserver with multiple etcd servers:
Best practices for etcd in Kubernetes:
  • Run an odd number of etcd members (3 or 5) to maintain quorum during failures.
  • Keep etcd isolated on a dedicated network when possible.
  • Automate and test regular etcd backups and restores.

Choosing a topology: stacked vs external

Putting it all together — multi-master HA design

  • Run multiple master nodes, each hosting a kube-apiserver.
  • Put a load balancer in front of the kube-apiserver instances and point clients to the load balancer endpoint.
  • Run multiple controller-manager and scheduler instances but rely on leader election to ensure a single active leader for each.
  • Deploy etcd as either stacked or external based on your operational needs; ensure an odd member count and backups.
For more details and production deployment guidance, see: Next steps: Explore how etcd consensus works in more detail and recommended numbers of etcd members for different cluster sizes and failure domains.

Watch Video