liveBook · Manning

HorizontalPodAutoscaler

Also called horizontal pod autoscaler, HPA

A HorizontalPodAutoscaler is a Kubernetes API resource and controller that adjusts a workload’s replica count according to observed metrics and configured targets.

How 4 Manning books explain it

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 →

Acing the Frontend Interview

The Horizontal Pod Autoscaler is a Kubernetes controller that adjusts a workload's number of pods according to resource or custom metrics.

How it is used
Applies metric-driven elasticity to Kubernetes workloads handling fluctuating traffic.
How deep it goes
Explains configuration, thresholds, metrics, and cluster coordination through a command and declarative manifest.
Examples
Uses a high-traffic API, kubectl autoscale command, and autoscaling/v2 multi-metric manifest.
What you can do after
Operate/configure it with replica bounds, CPU targets, and custom request-rate metrics.

Read how Acing the Frontend Interview 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 →

Also covered in

Related concepts

Questions about HorizontalPodAutoscaler

What is HorizontalPodAutoscaler?

A HorizontalPodAutoscaler is a Kubernetes API resource and controller that adjusts a workload’s replica count according to observed metrics and configured targets.

Which Manning books explain HorizontalPodAutoscaler?

Kubernetes for Developers, LLMs in Production, Acing the Frontend Interview and Server-Side WebAssembly.

What is HorizontalPodAutoscaler also called?

HorizontalPodAutoscaler is also called horizontal pod autoscaler or HPA.

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.