KEDA (Kubernetes Event-Driven Autoscaling) is a CNCF graduated project that extends Kubernetes with event-driven scaling capabilities, acting as both a Kubernetes Operator and a custom metrics adapter. While the built-in HPA can only scale on CPU and memory, KEDA connects workloads to 79+ external event sources β message queues, streaming platforms, databases, and custom metrics APIs β and uniquely enables scale-to-zero, making it indispensable for cloud-native architectures where idle resources carry cost. The crucial mental model is that KEDA controls the 0β1 transition directly, then hands off 1βN scaling to a managed HPA; understanding where each component takes responsibility explains virtually every behavior practitioners encounter.
What This Cheat Sheet Covers
This topic spans 16 focused tables and 152 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: KEDA Architecture and Core Components
KEDA is composed of three distinct Kubernetes deployments plus a set of CRDs; each component has a clearly bounded responsibility. Understanding which process does what is the foundation for diagnosing any scaling issue.
| Component | Example | Description |
|---|---|---|
kubectl get deploy -n keda keda-operator | Watches ScaledObject/ScaledJob CRDs, activates/deactivates workloads (0β1), and creates/manages the underlying HPA. | |
kubectl get deploy -n keda keda-metrics-apiserver | β’ Implements the Kubernetes External Metrics API β’ serves scaler metric values to the HPA so HPA can drive 1βN scaling | |
kubectl get deploy -n keda keda-admission-webhooks | Validates ScaledObject/ScaledJob manifests at apply time to catch misconfigurations before they affect production. | |
apiVersion: keda.sh/v1alpha1kind: ScaledObject | Custom resource linking a Deployment/StatefulSet/Custom Resource to one or more event-source triggers with full scaling config. | |
apiVersion: keda.sh/v1alpha1kind: ScaledJob | Custom resource that spawns a new Kubernetes Job per event batch rather than scaling a long-running Deployment. |