CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

HorizontalPodAutoscaler

Put real load on a Deployment and watch it go from one replica to six. The target is a percentage of the CPU request, not of the node, so a Pod with no request can never be autoscaled at all.

Workloads Guide 33 of 103 Intermediate

Written against the versions above. Needs metrics-server. Without it the HPA reports FailedGetResourceMetric and never scales.

Four nodes with metrics-server installed, as the four-node install guide sets up.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. Create it, and note the flag that is on its way out

  2. Idle, and the error you see for the first minute

  3. Real load, and the scale-up

  4. Remove the load: scale-down is deliberately slow

Official sources