# Horizontal Pod Autoscaler (HPA)

> The Horizontal Pod Autoscaler changes the number of replicas of a Kubernetes workload automatically from CPU, memory or custom metrics.

- Source: https://www.itwonderlab.com/horizontal-pod-autoscaler/
- Published: 2026-08-05
- Updated: 2026-08-05
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

The **Horizontal Pod Autoscaler** (HPA) raises and lowers the replicas of a [Kubernetes Deployment](https://www.itwonderlab.com/kubernetes-deployment/) to keep a metric, usually CPU utilization of the requests, near a target. It needs metrics-server and CPU requests on the pods.

### Key concepts

- **Formula**: `ceil(current replicas × current metric / target)`.
- **Behavior**: stabilization windows and scaling policies.
- **Related**: VPA (pod size), Cluster Autoscaler and Karpenter (nodes), KEDA (events).
- **Metrics**: resource, pods, object and external.

### Learn it

Follow [Horizontal Pod Autoscaler](https://www.itwonderlab.com/kubernetes-horizontal-pod-autoscaler/).
