Interview Prep/Kubernetes/Scheduling, Resources & Autoscaling

Explain the HPA scaling formula and behavior tuning.

IntermediateConceptScheduling, Resources & Autoscaling
Answer

desiredReplicas = ceil(currentReplicas x currentMetric / targetMetric), with a 10% tolerance. The autoscaling/v2 behavior field controls scale speed and stabilization (default scale-down stabilization 300 s).

behavior:
  scaleDown:
    stabilizationWindowSeconds: 300
    policies: [{ type: Percent, value: 20, periodSeconds: 60 }]
All Kubernetes questions Roadmap: Kubernetes core

More on Scheduling, Resources & Autoscaling