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
kubectlor API clients is not possible if the kube-apiserver is unreachable.
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)
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:- NGINX: https://nginx.org/
- HAProxy: https://www.haproxy.org/
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.
--leader-elect(default: true) enables the mechanism.--leader-elect-lease-durationsets the total lease length.--leader-elect-renew-deadlinedefines how long the leader will try to renew before giving up.--leader-elect-retry-periodsets retry frequency for contenders.
etcd topologies
etcd is the persistent data store for Kubernetes. There are two common topologies for running etcd in Kubernetes clusters:- Stacked control-plane topology — etcd runs on the same machines as the control-plane components (API server, controller-manager, scheduler).
- External etcd topology — etcd runs on a separate set of dedicated nodes.

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.
- Kubernetes Control Plane: https://kubernetes.io/docs/concepts/overview/components/#control-plane
- etcd documentation: https://etcd.io/docs/
- Kubernetes HA setup recommendations: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/