Observed output
kubectl describe hpa
Warning: autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
Attempted fix
Specified autoscaling/v2
in yml file, but warning remains.
head -n1 my_hpa.yml
apiVersion: autoscaling/v2
kubectl apply -f my_hpa.yml
kubectl describe hpa
Warning: autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
Cluster supports v2
kubectl api-versions | grep autoscaling/
autoscaling/v1
autoscaling/v2
autoscaling/v2beta1
autoscaling/v2beta2