Theory

Updated

October 30, 2026

Theory: HPA Owns Replicas; Canary Steps Also Own Replicas

Two controllers cannot both own spec.replicas without a rule. setCanaryScale and traffic-based splits exist to stop HPA from shrinking the canary out of existence.

Invariants

  1. Replica-based canary + HPA on the Rollout is the subtle bug.
  2. Traffic-based canary lets HPA scale the whole set more safely.
  3. Metrics-server must exist for HPA to do anything.
HPA  --replicas-->  Rollout  <-- canary step replica math

What can break

  • HPA on both stable and canary Deployments independently.

How to read this chapter

The problem, metrics, setCanaryScale.