Orchestration API removal
Kubernetes 1.26 autoscaling v2beta2 removed HorizontalPodAutoscaler targetAverageUtilization autoscaling/v2 migration
HorizontalPodAutoscaler fails to apply and old targetAverageUtilization shape is invalid.
Agent Quick Fix
Repair against the current Kubernetes contract, then keep the change narrow and source-backed.
Product: Kubernetes
Current-contract area: Kubernetes 1.26 removes HPA autoscaling/v2beta2
Likely root cause: HorizontalPodAutoscaler fails to apply and old targetAverageUtilization shape is invalid.
Repair direction: Verifier checks migrated apiVersion/fields and preservation of behavior. Check resource behavior after apply, not only schema acceptance.
Symptom
HorizontalPodAutoscaler fails to apply and old targetAverageUtilization shape is invalid.
Why This Happens
Manifests are static and may still validate against cached schemas; the target cluster's served API set is external and version-specific.
Common Wrong Fixes
- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.
Codex Search Keywords
These are the search terms observed in a neutral Codex validation run for this failure shape.
Kubernetes 1.26 autoscaling v2beta2 removed HorizontalPodAutoscaler targetAverageUtilization autoscaling/v2 migration
site:kubernetes.io autoscaling/v2beta2 removed 1.26 HorizontalPodAutoscaler
https://kubernetes.io/docs/reference/using-api/deprecation-guide/
'v1.26' in https://kubernetes.io/docs/reference/using-api/deprecation-guide/