Skip to main content
Kubernetes internalsLesson 6 of 12

Control Plane HA and etcd Quorum

Production clusters run an odd number of control plane (master) nodes, such as three, behind a single shared address. Let's follow etcd's majority agreement (quorum) to see why three, and what stops when some of them go down.

etcd alive3 / 3
Quorum (majority)2
WritesAllowed
Reads · running PodsNormal
3 control plane nodesUserkubectlWorker noderunning PodsShared addressLB / virtual IPMaster 1API server + etcdMaster 2API server + etcdMaster 3API server + etcdRequestStatus report
RequestResponse / reportWatch

What you will learn

  • Why run several control plane nodes
  • Why a write needs a majority to finish
  • One failure vs two failures
  • Why an even count gains nothing

etcd members and tolerated failures​

etcd membersQuorum (majority)Failures tolerated
110
220
321
431
532

Try it yourself​

kubectl get pods -n kube-system -l component=etcd -o wide # One etcd member per control plane node
kubectl get --raw='/readyz?verbose' | grep etcd # Can the API server reach etcd?
export ETCDCTL_ENDPOINTS=<endpoint> ETCDCTL_CACERT=<ca.crt> ETCDCTL_CERT=<client.crt> ETCDCTL_KEY=<client.key> # Cert flags once, for the commands below
etcdctl endpoint status --cluster -w table # Who is leader, Raft term and index
etcdctl endpoint health --cluster -w table # Members alive: is a majority up?

Check yourself

  1. A 3-node control plane loses two nodes. kubectl get pods works, but every create and delete fails. Why?
  2. To tolerate more failures, a team grows etcd from 3 to 4 members. How many failures can it survive now?
  3. etcd has lost quorum. What happens to containers already running on worker nodes?

Further reading: Kubernetes components · Creating highly available clusters with kubeadm · Operating etcd clusters