Horizontal Pod Autoscaler (HPA)

Difficulty: Advanced

Question

How does the Horizontal Pod Autoscaler (HPA) work?

Answer

HPA automatically scales the number of Pods in a Deployment based on observed CPU utilization. It queries the Metrics Server periodically and uses the formula: `Desired Replicas = Current Replicas * (Current Metric / Target Metric)`.

Concepts covered

Autoscaling, Metrics, CPU/Memory, Metrics Server