Key Concepts
HPA
Target
Metrics
Replicas
Required Permissions
HPA Status Values
How to View HPAs
Select Cluster
Select Namespace
Filter and Search
How to View HPA Details
Find the HPA
Click HPA Name
Review Details
- Overview: Name, namespace, target, status, age
- Replicas: Current, desired, min, and max replica counts
- Metrics: Configured metrics and current values
- Conditions: HPA controller conditions
- Events: Recent scaling events
How to Create an HPA
Click Create HPA
Write YAML
spec.scaleTargetRef- Target workload to scalespec.minReplicas- Minimum replica countspec.maxReplicas- Maximum replica countspec.metrics- Metrics to trigger scaling
Select Namespace
Create
How to Edit an HPA
Open Actions Menu
Click Edit YAML
Modify Spec
- Adjust min/max replicas
- Change metric thresholds
- Add or remove metrics
Save
How to Delete an HPA
Open Actions Menu
Click Delete
Confirm
Metric Types
HPAs support several metric types:Resource Metrics
Custom Metrics
Scaling Behavior
HPA v2 supports configuring scaling behavior:Troubleshooting
HPA shows 'unknown' for current metrics
HPA shows 'unknown' for current metrics
- Verify metrics-server is installed and running
- Check target pods have resource requests defined
- Wait for metrics collection (can take a few minutes)
- Verify metrics API is accessible:
kubectl top pods
HPA not scaling up
HPA not scaling up
- Check current replicas equals maxReplicas (at limit)
- Verify metric thresholds are being exceeded
- Check HPA conditions for errors
- Ensure target workload exists and is not paused
HPA not scaling down
HPA not scaling down
- Check current replicas equals minReplicas (at minimum)
- Verify stabilization window has passed
- Check scale-down policies if configured
- Review HPA events for scaling decisions
HPA scaling too aggressively
HPA scaling too aggressively
- Increase stabilizationWindowSeconds
- Adjust scale-down policies to be more gradual
- Consider using multiple metrics for better decision making
- Review and tune metric thresholds
Target workload not found
Target workload not found
- Verify the target exists in the same namespace
- Check scaleTargetRef name and kind are correct
- Ensure apiVersion matches the target resource
Custom metrics not working
Custom metrics not working
- Verify Prometheus Adapter or custom metrics API is configured
- Check metric name matches exactly
- Ensure metrics are being exported by pods
- Test with
kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1
FAQ
What resources can HPAs scale?
What resources can HPAs scale?
/scale subresource. DaemonSets cannot be scaled by HPAs.How quickly does HPA respond to load changes?
How quickly does HPA respond to load changes?
--horizontal-pod-autoscaler-sync-period). Actual scaling depends on stabilization windows and policies.What happens if I delete an HPA?
What happens if I delete an HPA?
Can I have multiple HPAs for one Deployment?
Can I have multiple HPAs for one Deployment?
What's the difference between HPA v1 and v2?
What's the difference between HPA v1 and v2?
Do I need metrics-server for HPA?
Do I need metrics-server for HPA?
How do I prevent scaling during deployments?
How do I prevent scaling during deployments?
--horizontal-pod-autoscaler-downscale-stabilization flag or configure behavior.scaleDown.stabilizationWindowSeconds to delay scale-down decisions.What if my pods don't have resource requests?
What if my pods don't have resource requests?