Skip to content

Multi-tenant scaling

Multi-tenant KEDA runs isolated KEDA operators inside one Kubernetes cluster. Each operator owns a non-overlapping set of workload namespaces, with separate event processing, certificates, and reconcile loops. Add a Kedify Pod Autoscaler (KPA) beside an operator when the tenant also needs an isolated horizontal autoscaling control loop.

Separate tenant KEDA operators and optional KPA controllers own non-overlapping workload namespaces in one Kubernetes cluster.
Scroll to explore
Diagram description

One Kubernetes cluster contains a shared Kedify Agent and isolated tenant KEDA operators. Each tenant owns a distinct set of workload namespaces and may pair its KEDA operator with an optional KPA. Native HPA and its external-metrics adapter remain shared.

  1. Tenant KEDA operators watch only their assigned namespaces. Each operator has its own Deployment, ServiceAccount, TLS certificates, and reconcile loop.
  2. Shared metrics adapter handles Kubernetes external-metrics requests for native HPA and routes each request to the KEDA operator that owns the workload namespace.
  3. Kedify Agent discovers tenant registrations, synchronizes certificates, reports health, and enables the Dashboard topology.
  4. Optional tenant KPA controllers watch the same namespaces as their paired KEDA operator. KPA reads external metrics directly from KEDA over mTLS and uses metrics.k8s.io for CPU and memory.

The Multi-Tenant tab in the Kedify Dashboard shows the default installation and its tenant KEDA/KPA pairs. It surfaces namespace ownership, readiness, TLS and routing health, KPA pairing, versions, resource use, and controller logs.

Default and tenant KEDA/KPA topology in the Kedify Dashboard

Multi-tenant KEDA and KPA solve related but distinct isolation problems:

Workload pathScaling signal path1 ↔ N controller
Native HPAShared metrics adapter routes external-metric requests to the tenant KEDA operatorCluster-wide Kubernetes HPA controller
KPATenant KPA queries its paired KEDA operator directly over mTLSTenant KPA controller

Both paths keep KEDA responsible for scaler polling, activation, fallback, cooldown, and scale to zero. KPA changes only the 1 ↔ N path for selected ScaledObjects and preserves the ScaledObject configuration model.

See Kedify Pod Autoscaler for supported metric sources, per-ScaledObject class selection, evaluation intervals, and current limitations.

The KEDA chart exposes three modes through kedify.multitenant.mode:

ModeKEDA operatorMetrics adapterWebhooksCRDs
""Standard single-tenantStandardStandardStandard
"default"Default tenant with multi-tenant routingShared, routes to tenantsYesYes
"tenant"Tenant operator onlyNoNoNo

The default installation owns cluster-wide singletons and provides the fallback metrics route. Each tenant installation adds only an operator. Unique release names keep Deployments, ServiceAccounts, Services, and certificate Secrets distinct even when several tenants share one control-plane namespace.

Every tenant KEDA operator registers its identity, watched namespaces, MetricsService address, TLS Secret, and default-tenant status. The Agent turns these registrations into the metrics adapter’s routing configuration.

Namespace sets must not overlap. When KPA is enabled, its watch set must exactly match its paired KEDA operator. A single KEDA operator paired with several KPA controllers is not a supported tenant topology.

Each KPA-enabled KEDA release also declares the exact KPA Deployment name. The Agent records that Deployment’s Kubernetes UID and verifies ownership before it exposes KPA telemetry or logs.

For native HPA requests, the shared metrics adapter uses a direct namespace-to-tenant lookup. An unmatched namespace uses the default tenant; without a default tenant, the request fails.

For KPA-backed ScaledObjects, the tenant KPA controller bypasses the shared external-metrics API path and queries its paired KEDA MetricsService directly. Tenant-specific mTLS identities protect both routes. Certificate updates are synchronized automatically and reloaded without restarting the metrics adapter.

Sharding bounds the number of ScaledObjects handled by each operator and horizontal autoscaler. You can run several KEDA/KPA pairs in one control-plane namespace, place each pair in a separate namespace, or combine the two patterns.

Monitor routing with the kedify_metrics_adapter_tenant_* metrics and the KedifyTenantConnectionReady and KedifyTenantConnectionNotReady Kubernetes events. For deployment commands and status checks, continue with Install and Configure Multi-tenant Scaling. For capacity planning, see Autoscaler performance and tuning.

Diagnose: Diagnose multi-cluster and tenant controllers.

Related capabilities: Access, telemetry and connectivity boundaries.