Kubernetes
HPA Commands
Automatically scale applications based on metrics. Learn to configure HPA for CPU, memory, and custom metrics to handle varying load while optimizing resource usage.
3 commands
Pro Tips
Set resource requests on pods - HPA uses requests to calculate current utilization percentage.
Use 'kubectl get hpa' to see current replicas, targets, and whether scaling is working.
Configure stabilization windows to prevent rapid scale up/down oscillation during traffic spikes.
Common Mistakes
HPA requires metrics-server installed in the cluster. Check 'kubectl top pods' works first.
Don't set HPA minReplicas to 0 in production - you'll have cold start latency when traffic returns.