HA topology¶
Scaling a control plane multiplies the pod, and the pod contains every role. The mechanism that keeps that safe is the lease: request serving multiplies freely, and the loops that must run once are held one at a time.
For what a deployment contains and how it is stood up, see Deployment anatomy and Deploy the control plane. For choosing a posture and sizing it, see High availability.
The replica¶
flowchart TB
subgraph POD["One replica, carrying every role"]
direction LR
A["api"]
C["controller"]
S["scheduler"]
end
subgraph LEASES["Leases, held in the store"]
direction LR
L1[("controller lease")]
L2[("scheduler lease")]
end
C --> L1
S --> L2
The roles are inside the replica and the leases are outside it. That is why a
second replica adds two more role instances and no more leadership: the new
controller contends the same lease, and the holder is the only one that acts.
What a replica multiplies¶
A second replica is a second pod carrying every role the pod runs, rather than a second copy of one role.
| What multiplies | Effect |
|---|---|
| Request serving | Every replica can serve, so request capacity rises with replicas |
| Lease-held loops | Only the lease holder acts, so a further replica is standby rather than throughput |
That asymmetry is the whole of control-plane high availability. Adding replicas buys request capacity and failover readiness; it does not buy more reconcile throughput, because reconcile is deliberately singular.
The role gates the reconcile phases¶
A role decides which reconcile phases a replica runs, and the recognised values
are a closed set. An unrecognised value resolves to all rather than failing.
| Role | Controller phase | Scheduler phase |
|---|---|---|
all |
Yes | Yes |
controller |
Yes | No |
scheduler |
No | Yes |
api |
No | No |
event-ingestor |
No | No |
event-ingestor is a recognised value that nothing currently dispatches on. A
replica configured with it runs neither phase.
Two answers mean a replica is correctly idle¶
flowchart TB
A["Cycle begins"]
B["Does this role run a phase?"]
C["service-role-skip"]
D["Claim or renew the lease"]
E["not-leader"]
F["Run the phases the role covers"]
A --> B
B -->|no| C
B -->|yes| D
D -->|not held| E
D -->|held| F
service-role-skip means this role never runs that phase. not-leader means it
would, and another replica holds the lease. Both are expected answers, and
together they account for every replica that is not reconciling.
Leadership is per lease, not per control plane¶
Leases are named, and the controller and the scheduler take different ones. The two are contended independently and can be held by different replicas.
The consequence during an incident is that "the control plane has no leader" is not a state. Controller leadership and scheduler leadership are separate questions with separate answers, and a stalled scheduler tells you nothing about the controller.
Reading which replica is acting¶
Leadership status answers who holds a given lease and when it expires. See Leadership and failover.