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
- Kubernetes1.36.4
- APIautoscaling/v2
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- TimeAbout 35 min
- Reviewed21 August 2026
Written against the versions above. Needs metrics-server. Without it the HPA reports FailedGetResourceMetric and never scales.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
Before you start
- The metrics-server guide. The HPA reads the same Metrics API
kubectl topdoes. - The requests, limits and QoS guide, because the target is a percentage of the request.
- The Deployments guide.
-
Create it, and note the flag that is on its way out
-
Idle, and the error you see for the first minute
-
Real load, and the scale-up
-
Remove the load: scale-down is deliberately slow