Wiki · Concept · Last reviewed August 12, 2026

KEDA

KEDA is a CNCF-hosted Kubernetes event-driven autoscaler. It turns scaler-reported activity and metrics from queues, streams, databases, telemetry systems, schedules, and other sources into replica changes for scalable workloads or the creation of Kubernetes Jobs.

Definition

KEDA, commonly expanded as Kubernetes Event-driven Autoscaling, is an open-source controller and external-metrics provider for Kubernetes. A KEDA scaler observes an event source and reports whether a workload should be active and what metric value should drive capacity. KEDA uses that information either to manage a scalable workload through a ScaledObject or to create Jobs from a ScaledJob.

“Event-driven” does not mean every source pushes an event into KEDA. Many built-in scalers poll a queue, service, database, or metrics endpoint; external push scalers can stream activation state. The event is operational demand represented through the chosen scaler's semantics.

KEDA is not an event broker, queue, scheduler, node provisioner, generic monitoring database, or AI safety system. It extends workload autoscaling. Node capacity still belongs to a node autoscaler, batch admission may belong to Kubernetes Kueue, and the correctness and authorization of queued work remain application responsibilities.

Snapshot

Architecture and Control Loop

KEDA 2.20 documents three in-cluster components:

Despite the similar name, keda-metrics-apiserver is not Kubernetes Metrics Server. Metrics Server normally supplies CPU and memory through metrics.k8s.io; KEDA supplies event-source metrics through external.metrics.k8s.io. CPU- or memory-only triggers are a special case: HPA reads their data from Metrics Server, and they cannot supply the activation signal needed to return from zero.

For a ScaledObject, the operator polls triggers while the target is at zero. When a trigger becomes active, the operator activates the workload. Once replicas are running, HPA queries metrics served by KEDA and controls scaling in the one-to-many range. When triggers become inactive and the scale-to-zero cooldown has elapsed, KEDA can deactivate the target. The KEDA cooldown applies to the transition to zero; HPA behavior and stabilization govern ordinary scale-up and scale-down above zero.

The version 2.20 ScaledObject reference defaults to a 30-second KEDA polling interval, a 300-second scale-to-zero cooldown, zero minimum replicas, and 100 maximum replicas. Those are software defaults, not recommended production values. Polling, HPA sync, source freshness, application startup, and node provisioning are separate clocks.

With multiple ordinary triggers, KEDA exposes metrics and Kubernetes HPA selects the largest replica recommendation, subject to the configured maximum. KEDA's optional scaling modifiers instead compose named trigger values into one external metric. A formula is executable scaling policy: it needs unit checks, missing-data behavior, tests, and change review.

The external metrics API is also a cluster-level integration point. KEDA's operations guide notes that only one active metrics provider can own external.metrics.k8s.io in a cluster. Operators using Kubernetes Prometheus Adapter or another provider must inspect the registered APIService objects and decide which component serves which metrics API rather than assuming adapters can coexist without coordination.

Resource Models

ScaledObject is for a Deployment, StatefulSet, or custom resource that exposes the Kubernetes /scale subresource. The scale target must be in the same namespace as the ScaledObject. The object identifies the target, triggers, activation and scaling thresholds, replica bounds, timing, fallback behavior, and optional HPA behavior or composite-metric policy.

ScaledJob is for discrete work. It contains a Job template and triggers; on each poll KEDA calculates how many Jobs to create, bounded by its scaling strategy and maxReplicaCount. Version 2.20 defaults the polling interval to 30 seconds and the per-poll maximum to 100. A Job is not automatically one event: the scaler's target value, running and pending Jobs, selected scaling strategy, message acknowledgement, and application concurrency determine the relationship.

Authentication can be embedded in a workload reference, delegated through namespaced TriggerAuthentication, or shared through cluster-scoped ClusterTriggerAuthentication. The cluster-scoped form is reusable across namespaces and therefore has a larger blast radius. KEDA also supports external scalers over gRPC; TLS and client certificates are available, while disabling certificate validation with unsafeSsl removes server authentication and should not be treated as a production shortcut.

AI and Agent Workloads

AI infrastructure often has demand that CPU and memory do not describe well. Embedding pipelines wait on document queues. Evaluation workers drain task streams. Moderation, transcription, synthetic-data generation, batch inference, and coding-agent sandboxes may arrive as discrete jobs. Online inference may be constrained by requests in flight, tokens waiting, batch occupancy, GPU memory, or queue age rather than average CPU.

KEDA can translate one of those signals into workload capacity, but signal choice is policy. Queue depth measures items, not age, urgency, token count, GPU time, or downstream cost. A short queue of large prompts can require more capacity than a long queue of small requests. A backlog can grow because consumers are slow, because a dependency is failing, or because an attacker is submitting work. Scaling all three cases identically can waste money or amplify harm.

Scale-to-zero is attractive for costly inference and agent pools, but the full cold-start path can include KEDA polling, pod scheduling, node or accelerator provisioning, image pull, model loading, cache warming, and readiness. KEDA does not shorten those stages. User-facing services may need a nonzero floor, pre-provisioned nodes, or a latency-aware design; asynchronous evaluation may tolerate the delay.

For ScaledJob, workers need bounded retries, idempotent or deduplicated side effects, timeouts, cleanup, and clear acknowledgement semantics. An agent Job that sends mail, changes code, or calls external tools still needs authorization, sandboxing, and human gates. Autoscaling multiplies execution capacity; it does not grant legitimate authority.

Current Context

As of August 12, 2026, KEDA 2.20.2 was the latest stable upstream release, published July 31, while the 2.21 documentation was marked unreleased. The 2.20 catalog listed 77 scalers. KEDA's 2.20 cluster guide listed Kubernetes 1.33 through 1.35 as its tested compatibility window and described support as community-provided on a best-effort basis.

The 2.20.2 patch notes include fixes for operator panics, a zero-delay gRPC reconnect loop, shared HTTP transports, and negative external metric handling. That is a reminder to record the patch version, not merely “KEDA 2.20,” and to rehearse upgrades. The 2.20.0 release also moved event recording to events.k8s.io and warned installations with custom or restricted RBAC to add the needed event permissions before upgrading.

KEDA became a CNCF Graduated project on August 22, 2023 after project-governance and security-review work. Graduation is evidence about the open-source project's maturity; it does not certify a local scaler formula, credential scope, queue contract, or cost ceiling.

Governance and Safety

KEDA should be governed as a control-plane component that can turn a remotely observed number into compute, network calls, data access, and external side effects. Useful controls include:

Fallback is a resilience setting, not evidence that the event source is healthy. A static fallback replica count can preserve some capacity after repeated scaler errors, but it may be too small for real demand or unnecessarily expensive during an outage. Document which failures trigger it, its duration, its alert, and how an operator returns to measured scaling.

Failure Modes

Evidence and Verification

A governance-grade deployment record should preserve:

Verification should cover more than valid YAML. Test idle-to-active latency, one-to-many scale-out, backlog drain, scale-down, a missing or slow metric source, invalid credentials, broker partition limits, unschedulable pods, a downstream outage, a poison task, and attempted metric inflation. Inspect the generated HPA, KEDA conditions and events, actual pod or Job counts, queue age, completed work, errors, node changes, and cost. The claim to verify is not “KEDA scaled”; it is “the system admitted and completed legitimate work within its safety, reliability, and budget bounds.”

Source Discipline

Use versioned KEDA reference pages for CRD fields and defaults, the matching scaler page for metric and authentication semantics, upstream release notes for changes and upgrade hazards, and Kubernetes documentation for HPA, Jobs, metrics APIs, admission, quotas, and node autoscaling. The KEDA homepage and CNCF project page establish identity and project status; they are not configuration references.

Distinguish stable from unreleased documentation, built-in from external or experimental scalers, core KEDA from add-ons, and community support from a commercial support contract. A vendor dashboard or Helm value may describe one distribution rather than upstream behavior. A claim should name the KEDA version, Kubernetes version, scaler type, metric definition, authentication path, target, and observation date.

Documentation can also disagree. When an overview, example, generated chart, and CRD reference differ, use the reference for the installed release, inspect the installed CRD and rendered manifest, and verify runtime behavior. Never infer metric units from a trigger name alone.

Spiralist Reading

Spiralism reads KEDA as a bell that converts waiting work into a request for capacity.

The bell does not know whether the queue is just, urgent, wasteful, or malicious. Its institutional value comes from making the conversion inspectable: which signal may summon machines, how many, under whose credentials, at what cost, and with what condition for standing down.

Open Questions

Sources


Return to Wiki