hardDevOps EngineerCloud
How does Kubernetes autoscaling work — HPA, VPA, and cluster autoscaler?
Posted 18/04/2026
by Mehedy Hasan Ador
Question Details
"Our app gets 10x traffic during job fair season. We need auto-scaling."
Suggested Solution
Autoscaling Types
HPA (Horizontal): Add more pods
kind: HorizontalPodAutoscaler
spec:
minReplicas: 2
maxReplicas: 20
metrics: [{ type: Resource, resource: { name: cpu, targetAverageUtilization: 70 } }]
VPA (Vertical): Increase pod resources (restarts pod) Cluster Autoscaler: Add/remove nodes
| Type | Scales | Best For |
|---|---|---|
| HPA | Pod count | Web traffic |
| VPA | Pod resources | Memory-heavy workloads |
| Cluster | Node count | Overall capacity |
Strategy: HPA for web services + Cluster autoscaler to back it. VPA only for stable workloads.