k8s-autoscaling-troubleshooting
Autoscaling troubleshooting
Find out why a workload does not scale the way it should, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.
A HorizontalPodAutoscaler (HPA) sets the replica count of a Deployment or
StatefulSet every 15 seconds from metrics: CPU and memory from metrics-server
(metrics.k8s.io), or custom and external metrics from an adapter. KEDA turns a
ScaledObject into an HPA named keda-hpa-<name> and serves its triggers as external
metrics (external.metrics.k8s.io). A VerticalPodAutoscaler (VPA) changes requests
instead of replicas. The HPA writes what it decided, and why, into three status
conditions (AbleToScale, ScalingActive, ScalingLimited) and its events, so they usually
name the cause.