Kubernetes Autoscaling with KEDA: Scale to Zero, Event-Driven Triggers and Fine-Tuning the HPA
A practical guide to event-driven autoscaling on Kubernetes: why CPU-based HPA fails for queue workers, how the HPA formula and its behavior field really work, KEDA ScaledObjects with SQS, cron and Prometheus, scaling to zero without wrecking latency, fallback when a scaler goes down, clean SIGTERM shutdown, and the five mistakes you will hit in production. Copy-paste YAML and code included. September 9, 2026 expanded edition: KEDA internals (operator, metrics server and the generated HPA) with the kubectl get --raw command that separates a scaler failure from an HPA failure, the single external.metrics.k8s.io provider conflict that silently kills prometheus-adapter, the real difference between threshold and activationThreshold and why the latter is ignored when the minimum is 1, the full scaling arithmetic with numbers plus the clarification that cooldownPeriod only governs the 1-to-0 step, ScaledJob and its four scaling strategies, authentication with TriggerAuthentication and workload identity instead of static keys, the parameters that actually matter in the Kafka, Prometheus and cron scalers, the complete cold-start budget with a prepull DaemonSet and the HTTP add-on, the second autoscaling tier with Karpenter and negative-priority capacity reservation, observability with operator metrics and Prometheus alerts, operations with the pause annotations and living with Argo CD, concurrency-based scaling for synchronous services, the real cost and the three cases where KEDA is not the answer, governance at a hundred ScaledObjects, a full case study with a 61% lower bill, FAQ and glossary.
Verificando acceso...