EKS HPA's apiVersion fails to stay at v2beta2

0

When I deploy my HPA's I am choosing apiVersion: autoscaling/v2beta2 but kubernetes is making them autoscaling/v2beta1

For example: If I deploy this.

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: surething-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: surething
  minReplicas: 2
  maxReplicas: 4
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Percent
        value: 100
        periodSeconds: 15
    scaleUp:
      stabilizationWindowSeconds: 0
      policies:
      - type: Percent
        value: 100
        periodSeconds: 15
      - type: Pods
        value: 4
        periodSeconds: 15
      selectPolicy: Max
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization 
        averageUtilization: 100

I will get this

apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: surething-hpa
  namespace: dispatch-dev
  uid: 189cee35-c000-410b-954e-c164a08809e1
  resourceVersion: '404150989'
  creationTimestamp: '2021-04-04T17:30:48Z'
  labels:
    app: dispatch
    deployment: dev
    microservice: surething
  annotations:...
  selfLink:...
status:...
spec:
  scaleTargetRef:
    kind: Deployment
    name: surething
    apiVersion: apps/v1
  minReplicas: 2
  maxReplicas: 4
  metrics:
    - type: Resource
      resource:
        name: cpu
        targetAverageUtilization: 100

All the documentation I can find on EKS and HPA's says that I should be able to use apiVersion: autoscaling/v2beta2. My cluster is version 1.21 and my nodegroup is as well.

When I run kubectl api-versions I can find autoscaling/v2beta2 in the list.

I'm at wits end on this one. Can someone tell me what I am doing wrong?

Kay
gefragt vor 2 Jahren91 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen