Two etcd Members Tolerate No More Failures Than One, So Go from One Control Plane to Three
etcd stores the whole cluster state and uses Raft: a write is committed only when a majority of members, ⌊n/2⌋+1, agree. With stacked control planes (kubeadm's default), each control plane runs one etcd member, so the control-plane count decides how many machines can fail.
| Members | Quorum | Failures tolerated |
|---|---|---|
| 1 | 1 | 0 |
| 2 | 2 | 0, and either machine can cause it |
| 3 | 2 | 1 |
| 5 | 3 | 2 |
Two members are worse than one: still no failure tolerated, with twice the hardware that can break quorum. Even numbers in general add a machine without adding tolerance.
Growing a Cluster
- Start with one control plane if needed, but initialise it against a virtual IP (
--control-plane-endpoint), so others can join later without new certificates (see A Highly Available Control Plane Needs a Virtual IP That No Single Node Owns). - Add the second and third members in the same session, and take an etcd snapshot before each join: a failed member join on a one-member cluster can break quorum.
- HA is not a backup: three members replicate a bad
kubectl deletefaithfully. Snapshots still matter, and they need the PKI next to them (see An etcd Snapshot Alone Can't Rebuild a kubeadm Control Plane, So Back Up the PKI with It and Back Up and Restore etcd on a kubeadm Cluster). - etcd needs low-latency disks and a steady network (100 ms heartbeat, 1 s election timeout by default); a flaky USB network adapter on one member shows up as repeated leader elections (see Workloads on the Only Control Plane Can Starve etcd, So Heavy Nodes Should Be Workers).
References
- etcd FAQ: why an odd number of cluster members - quorum and failure tolerance.
- Kubernetes documentation: Options for Highly Available Topology - stacked vs external etcd.
- Kubernetes MOC - hub for Kubernetes notes.
Review cards
Flashcard How many failures do 1, 2 and 3 etcd members tolerate, and why?
0, 0 and 1. A write needs a majority (⌊n/2⌋+1): 1 of 1, 2 of 2, 2 of 3.
Quiz A cluster has one stacked control plane. What is the safest way to grow it?
- Add one control plane now, a second one next month
- Add the second and third on the same day, after an etcd snapshot
- Add a fourth to have a spare
- Convert workers to control planes one at a time
With two members, quorum needs both machines, so the third should follow right away; the snapshot covers a join that fails. A fourth member adds no tolerance over three.
Flashcard Why do three etcd members still not replace backups?
They replicate every write, including a mistaken delete. Only snapshots let you go back in time.