Kubernetes v1.37: HPA Scale-to-Zero Is Now Beta and On by Default

Kubernetes v1.37: HPA Scale-to-Zero Is Now Beta and On by Default

Cloud Platform Engineering

Kubernetes v1.37 promotes HPA scale-to-zero from alpha to beta and enables it by default — no feature gate required. For queue consumers and batch processors sitting idle between workloads, that translates directly to idle compute costs that can now be eliminated.

What Happened

Kubernetes v1.37 graduates the minReplicas: 0 capability for HorizontalPodAutoscaler from alpha (feature-gated, opt-in) to beta (default-on, no configuration required). The feature allows the HPA to scale a deployment completely down to zero pods when demand signals drop below threshold, then scale back up when demand returns.

The core mechanic: traditional HPA metrics (CPU, memory utilization) require running pods to generate signal — when replicas reach zero, there’s nothing to measure. Scale-to-zero therefore requires external or object metrics that exist independently of running pods. Queue depth, request backlog counts, or custom Prometheus metrics serve as the signal source:

spec:
  minReplicas: 0
  maxReplicas: 10
  metrics:
  - type: External
    external:
      metric:
        name: queue_consumer_lag
      target:
        type: AverageValue
        averageValue: "30"

Why It Matters

The economics are straightforward for the right workloads. Queue consumers that process batch jobs, ML inference pipelines that serve sporadic requests, and event-driven processors that sit idle between workloads all represent compute capacity that organizations pay for continuously even when utilization is near zero. Scale-to-zero eliminates that idle cost structurally, not through manual intervention.

The pattern also enables genuinely serverless-like behavior within existing Kubernetes infrastructure — without adopting a separate function-as-a-service layer. Teams that have rejected FaaS for operational complexity reasons can achieve similar cost profiles for async workloads while keeping their platform engineering surface area consistent.

Where It Doesn’t Apply

The feature has a hard constraint: it does not work for synchronous HTTP workloads without a buffering layer. Kubernetes Services do not queue incoming requests while pods are absent — a request arriving at a service with zero running replicas will fail. The cold-start sequence (HPA observes metric → pod scheduled → application starts → workload begins processing) introduces latency that synchronous callers cannot absorb.

Scale-to-zero is appropriate for workloads where the work can wait in a durable queue. It is not appropriate as a general-purpose cost reduction for web API pods or any workload with synchronous callers expecting low-latency responses.

The So What

If your cluster has queue consumers or batch processors that spend meaningful time at near-zero utilization, v1.37’s default-on beta makes scale-to-zero a no-configuration optimization worth enabling immediately. The required metrics infrastructure — a Prometheus adapter or equivalent metrics adapter — is the only prerequisite for most teams already running observability tooling. For synchronous workloads, the feature doesn’t apply, and the cold-start risk makes it actively harmful if mistakenly applied.

Source: Kubernetes Blog

Content created with AI assistance and reviewed for accuracy.

💬

Join the conversation

Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.

Join Stack Insiders →

Newsletter coming soon.

Curated digests across AI, biohacking, photography, travel, and more. Be the first to know when we launch.