0

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
Jared Beck
  • 119
  • 3

1 Answers1

0

That warning is not related to your yaml configurations.

You should update your kubectl client, somewhat matching kubernetes api server version.

SYN
  • 1,751
  • 9
  • 14