Difference between API versions v2beta1 and v2beta2 in Horizontal Pod Autoscaler?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
The practical answer is that autoscaling/v2beta2 was the more complete successor to autoscaling/v2beta1, especially for scaling behavior controls, and both were transitional APIs on the way to stable autoscaling/v2. In current Kubernetes, you generally should not choose either beta version for new manifests if stable autoscaling/v2 is available in your cluster.
The Main Functional Difference
The biggest difference users noticed was the behavior field in v2beta2. That field lets you control how aggressively the HPA scales up or down, including stabilization windows and scaling policies.
A v2beta2 example looks like this:
That explicit behavior tuning was the main reason many teams moved from v2beta1 to v2beta2 before stable v2 became the preferred destination.
What Stayed Similar
Both versions were part of the more capable HPA API line beyond the old autoscaling/v1 CPU-only style. Both supported richer metric configurations than the original stable HPA API.
In both cases, the object model revolves around:
- '
scaleTargetRef' - '
minReplicasandmaxReplicas' - a list of
metrics
So if you migrated between them, the manifest did not become conceptually different. The main shift was toward the newer target specification style and the added scaling behavior controls.
Metric Target Structure Evolved
One source of migration confusion is that newer HPA API versions use a nested target structure inside each metric block. That structure is also what stable autoscaling/v2 uses.
A modern metric block looks like this:
This is easier to reason about than older field layouts scattered across different metric types. In practice, v2beta2 is closer to stable autoscaling/v2 and therefore a cleaner migration step if you are coming from older manifests.
Why v2beta2 Became The Better Migration Target
Historically, v2beta2 was the last beta form before stable autoscaling/v2 took over. That matters because it usually means:
- fewer surprises when moving to stable
v2 - access to scaling behavior controls
- a manifest shape closer to the current API
If you are maintaining old YAML, the better question is usually not "should I use v2beta1 or v2beta2?" It is "can I move straight to autoscaling/v2 on this cluster version?"
Deprecation Matters More Than The Beta Comparison
For current Kubernetes maintenance work, the deprecation timeline is operationally more important than the old feature comparison.
According to Kubernetes deprecation guidance:
- '
autoscaling/v2beta1was removed in Kubernetes1.25' - '
autoscaling/v2beta2was removed in Kubernetes1.26'
That means a manifest still using either beta API will fail once the cluster is upgraded past the removal point.
So even if v2beta2 was functionally better than v2beta1, the durable answer today is to migrate to autoscaling/v2.
A Stable autoscaling/v2 Example
This is what new work should usually target:
If you also need behavior tuning, stable v2 supports that model too.
Migration Advice In Practice
If you encounter v2beta1 in an existing codebase:
- check the cluster version first
- convert metric targets to the newer nested
targetshape if needed - move directly to
autoscaling/v2unless a very old cluster blocks that - add
behavioronly if you actually need controlled scale-up or scale-down policies
That sequence reduces needless intermediate migrations.
Common Pitfalls
- Treating the old beta-version choice as if it still matters more than stable
autoscaling/v2. - Upgrading the cluster and forgetting that
v2beta1andv2beta2were removed in later releases. - Copying old HPA metric fields without converting them to the newer
targetstructure. - Assuming
behaviorexists in the older API just because it exists in later examples. - Migrating YAML mechanically without checking how the autoscaler should actually behave.
Summary
- '
v2beta2was the more complete successor tov2beta1, especially because it addedbehaviorcontrols.' - Both beta APIs were transitional steps toward stable
autoscaling/v2. - '
v2beta1was removed in Kubernetes1.25, andv2beta2was removed in1.26.' - For current clusters, new manifests should usually use
autoscaling/v2. - When migrating, focus on metric target structure and scaling behavior, not only the API version string.

