HA, etcd quorum, and failure domains
Calculate an etcd majority and see how failure domains determine actual control-plane availability.
What you will understand
- Explain why API-server replicas depend on a functioning etcd cluster.
- Calculate the number of configured voting members required for quorum.
- Predict the effect of a host or zone loss using member placement.
Builds on: Leases and leader election, Capacity and scale trade-offs
Why API availability depends on etcd
A cluster has three API servers behind a load balancer. One goes down and the load balancer can send requests to the remaining instances. Those instances still depend on etcd, the replicated store for Kubernetes API state. The cluster needs a majority of configured voting etcd members to agree on committed changes. That majority is the quorum. Three voters require two, four require three, and five require three. A fourth voter adds a copy without increasing the number of failures those voters can tolerate.
Use the quorum scene to remove members and predict whether etcd can commit writes. When a majority is unavailable, running Pods may continue doing work where dependencies still function. API operations and controllers requiring stored state or new writes can fail. An API server process accepting a connection says little about whether the control plane can currently make changes.
How many etcd voters must stay available?
A three-voter cluster needs two configured members available for quorum. Losing the majority blocks new writes that need it.
- Voter 1Available
- Voter 2Available
- Voter 3Available
The majority remains 2 because the cluster has 3 configured voters. Available voters can communicate in this example.
Voters are simplified to three members; learners, read consistency modes and detailed Raft messages are omitted.
Inspect the quorum decision
Try the same kind of API write with three, two, and one available etcd voter. Restart an original voter and observe writes resume.
From kubectlTo API server
Write with all voters available
The API server sends the storage operation to etcd. A voting majority can commit it, so the client sees a successful ConfigMap creation.
- Before
- 3 of 3 / requested
- After
- 3 of 3 / commits
The API server sends the storage operation to etcd. A voting majority can commit it, so the client sees a successful ConfigMap creation.
Uses three stacked control-plane members in a disposable kind cluster. Leader elections and retries are compressed. The example restores an original member with its data intact.
Reveal prediction answer
Two. Quorum is calculated from configured voting membership, so stopping a voter does not reduce the majority needed.
Compare ConfigMap writes with one member stopped, two stopped, and one of them restored.
Test writes in a disposable HA clusterExplore another case
Open Inspect the quorum decision to follow three ConfigMap write attempts as voters stop and return.
Count which voters survive a zone loss
A failure domain is a set of components that can fail together because they share something such as power, a host, a rack, or a zone. Three etcd members in one zone tolerate a member failure there, but a zone outage can take all three. A two-to-one split across zones loses quorum if the larger zone goes down. Distributing three voters one per zone can tolerate losing one zone if the remaining network paths and members work. In the scene, vary placement and count the surviving voters.
Which single failure could remove several voters?
Members in the same zone share a failure risk. Count voters that survive a zone failure, then evaluate the remaining commit path.
Group voters by failure domain
- Shared host / zoneControl plane Acorrelated placement
- Shared host / zoneControl plane Bcorrelated placement
Two replicas in one failure domain can disappear in the same infrastructure incident.
Check connectivity and latency after a loss
- Control plane ADisk and networkdurable replication
- Control plane BDisk and networkdurable replication
Network and disk latency affect consensus and election behavior even when processes remain Running.
Verify API and workload health separately
- Shared host / zonePossible correlated failure
- Control plane AAPI + stacked etcd
- Control plane BAPI + stacked etcd
- Disk and networkConsensus latency path
- Existing workloadsMay continue without API
Existing Pods may serve during an API outage, while scheduling and reconciliation are impaired.
The figure illustrates correlated dependencies rather than prescribing one universal cloud topology.
Explore another case
Inspect the control plane without changing it
The training cluster has one control-plane node. Inspect the API readiness details, system Pods, and Leases to see its responsibilities. The example ConfigMap is a harmless write marker to recognize before and after a separate recovery exercise. Save and apply it only in the lab namespace where needed.
apiVersion: v1
kind: ConfigMap
metadata:
name: m18-marker
namespace: kv-lab
labels:
lab: m18
data:
purpose: control-plane-recovery-checkkubectl --context kind-kv-lab get --raw='/readyz?verbose'
kubectl --context kind-kv-lab -n kube-system get pods -o wide
kubectl --context kind-kv-lab -n kube-system get leases
# Read-only evidence: the single-node teaching cluster is not HA.
kubectl --context kind-kv-lab get nodesFor the control-plane recovery lab, treat the single-node run as inspection and restore practice. Use the scene to make a failure table for three or five voters without disrupting system components.
Test quorum in a disposable HA cluster
Use the pinned kind and kubectl tools from lab-env.sh. Create kv-quorum-trace as a separate cluster. This exercise stops two Docker containers that belong to this named cluster. The lab kubeconfig below keeps the exercise separate from other contexts.
kind create cluster --name kv-quorum-trace --kubeconfig ./kv-quorum.kubeconfig \
--image 'kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5' \
--config - --wait 180s <<'YAML'
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: control-plane
- role: control-plane
YAMLStop one voter and check that the write succeeds. If the remaining members are still electing a leader, retry the kubectl command after a few seconds.
docker stop kv-quorum-trace-control-plane3
kubectl --kubeconfig ./kv-quorum.kubeconfig --request-timeout=10s create configmap with-majority --from-literal=proof=one-stoppedStop a second voter. This time the write should fail or time out.
docker stop kv-quorum-trace-control-plane2
kubectl --kubeconfig ./kv-quorum.kubeconfig --request-timeout=10s create configmap without-majority --from-literal=proof=two-stoppedRestore one of the original voters and retry the write if the API is still recovering. Clean up after seeing the write succeed.
docker start kv-quorum-trace-control-plane2
kubectl --kubeconfig ./kv-quorum.kubeconfig --request-timeout=10s create configmap after-recovery --from-literal=proof=majority-restoredkind delete cluster --name kv-quorum-trace --kubeconfig ./kv-quorum.kubeconfigRecover after majority loss
Membership changes are writes too. Plan redundancy while a healthy majority exists. If you lose the majority permanently, follow the recovery procedure for the etcd version and topology. Verify backups and isolate the new membership before bringing a restored service into use.
Check your understanding
Five voters are split three in zone A and two in zone B. Which outage preserves a majority?
Losing zone B leaves three of five, enough for quorum. Losing zone A leaves two, so neither the health of the remaining members nor extra API-server copies can provide a majority.
Go to the source
Reviewed 2026-10-27 · Kubernetes 1.37 · Related local exercise