HorizontalPodAutoscaler
A HorizontalPodAutoscaler is a Kubernetes API resource and controller that adjusts a workload’s replica count according to observed metrics and configured targets.
Kubernetes for Developers
A pod autoscaler is a Kubernetes controller that adjusts the number of workload replicas according to resource or application metrics.
- How it is used
- Automates Deployment replica counts as traffic or CPU-intensive work changes.
- How deep it goes
- Works through CPU-target configuration and load testing, then extends to external metrics without detailing Ingress setup.
- Examples
- Uses a pi-calculating HTTP endpoint, Apache Bench load, an external RPS metric, and CPU-intensive worker Pods.
- What you can do after
- Operate/configure it with an HPA manifest and observe replica changes using kubectl commands.
Read how Kubernetes for Developers explains HorizontalPodAutoscaler →
LLMs in Production
A horizontal pod autoscaler is a Kubernetes controller that adjusts an application's pod replica count according to observed metrics.
- How it is used
- Adjusts an application's pod replicas to match observed CPU or memory demand, supporting both scale-up protection and cost-saving scale-down.
- How deep it goes
- Explains native CPU and memory scaling, then identifies GPU-based scaling as a custom-metrics setup requiring additional services.
- Examples
- Uses CPU and memory for basic scaling and GPU utilization as an LLM-serving custom metric.
- What you can do after
- Evaluate whether native CPU and memory metrics suffice or custom GPU metrics are needed for scaling.
Read how LLMs in Production explains HorizontalPodAutoscaler →
Server-Side WebAssembly
The Horizontal Pod Autoscaler is a Kubernetes controller that adjusts a workload's replica count according to observed resource utilization or other metrics.
- How it is used
- Scales Spin applications in Kubernetes according to CPU and memory demand, reusing Kubernetes-native orchestration.
- How deep it goes
- Implements application creation, load generation, registry publishing, manifest scaffolding, monitoring, and observed replica changes.
- Examples
- Uses a recursive Fibonacci /load route, concurrent oha traffic, kubectl get hpa, and deployment events showing replicas scaling to ten.
- What you can do after
- Operate/configure HPA for a Spin application using Spin kube scaffolding and kubectl.
Read how Server-Side WebAssembly explains HorizontalPodAutoscaler →
Related concepts
- autoscalingimplements · Autoscaling is the automatic adjustment of computing resource capacity or running instances in response to workload demand or measured system conditions.
- Kubernetes Deploymentused by · A Kubernetes Deployment is a declarative API resource that manages the desired state, scaling, and updates of a replicated application workload.
- Kubernetesused by · Kubernetes is an open-source platform for orchestrating and automating the deployment, scaling, and management of containerized workloads across computing clusters.
- replica countconfigures · A replica count is a configuration value specifying the desired number of concurrently running instances of a workload.
- metrics-serveruses · Metrics Server is a Kubernetes component that collects resource-usage metrics from kubelets and exposes them through the resource metrics API.
- replicaconfigures · A replica is a copy of data or state, or an equivalent running instance of a component, maintained alongside others in a replicated system.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


