Skip to content

Conversation

@AntoineSebert
Copy link
Contributor

@AntoineSebert AntoineSebert commented Nov 21, 2025

The resource contains spec.metrics, but deployment attempts produce:

I1121 10:04:32.570149  234160 warnings.go:110] "Warning: unknown field \"spec.metrics\""

The API autoscaling/v1 does not allow metrics (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#horizontalpodautoscalerspec-v1-autoscaling), but autoscaling/v2 does (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#horizontalpodautoscalerspec-v2-autoscaling).

Therefore, changing autoscaling/v1 to autoscaling/v2 will solve the issue.

Furthermore, the metrics fields must be placed into a target object (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#metrictarget-v2-autoscaling).

@secana secana merged commit cf47dcc into kellnr:main Dec 8, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants