An HPA targets 60% CPU utilization. The Deployment has 4 replicas and average utilization is 150%. What does the HPA do on its next loop?
- ceil(4 × 150 / 60), computed from the ratio of current to target utilization. desiredReplicas = ceil(currentReplicas × currentMetric / targetMetric).
- It adds one replica per control-loop iteration until utilization is under 60%. The HPA jumps directly to the computed count (bounded by behavior policies), it does not step by one.
- It cannot scale because utilization above 100% means the metric is invalid. Utilization above 100% simply means usage exceeds requests; it is a normal input.
- It doubles the replicas because utilization is over 100%. There is no doubling rule; the ratio decides.
The HPA jumps straight to ceil(current replicas × current utilization ÷ target); it does not add one pod at a time.
The formula is the whole algorithm: scale replicas by the ratio of observed to target, round up, then apply tolerance, min/max, and behavior limits. Utilization is usage divided by request, which is why requests must be honest.
Saying it adds one replica per loop, or that 150% utilisation is impossible. Utilisation is usage divided by the request, so it can exceed 100%, and the HPA jumps straight to ceil(current × observed ÷ target), bounded only by min/max and the behavior policies.