@@ -17,7 +17,7 @@ Here's an example of a `HorizontalPodAutoscaler` resource configured to get
1717` requests-per-second ` metrics from each pod of the deployment ` myapp ` .
1818
1919``` yaml
20- apiVersion : autoscaling/v2beta2
20+ apiVersion : autoscaling/v2
2121kind : HorizontalPodAutoscaler
2222metadata :
2323 name : myapp-hpa
@@ -54,10 +54,8 @@ policy](https://kubernetes.io/docs/setup/release/version-skew-policy/) offered
5454for Kubernetes, this project aims to support the latest three minor releases of
5555Kubernetes.
5656
57- The default supported API is `autoscaling/v2beta2` (available since `v1.12`).
58- This API MUST be available in the cluster which is the default. However for
59- GKE, this requires GKE v1.15.7 according to this [GKE
60- Issue](https://issuetracker.google.com/issues/135624588).
57+ The default supported API is `autoscaling/v2` (available since `v1.23`).
58+ This API MUST be available in the cluster which is the default.
6159
6260# # Building
6361
@@ -99,7 +97,7 @@ This is an example of using the pod collector to collect metrics from a json
9997metrics endpoint of each pod matched by the HPA.
10098
10199` ` ` yaml
102- apiVersion: autoscaling/v2beta2
100+ apiVersion: autoscaling/v2
103101kind: HorizontalPodAutoscaler
104102metadata:
105103 name: myapp-hpa
@@ -219,7 +217,7 @@ with the result of the query.
219217This allows having multiple prometheus queries associated with a single HPA.
220218
221219` ` ` yaml
222- apiVersion: autoscaling/v2beta2
220+ apiVersion: autoscaling/v2
223221kind: HorizontalPodAutoscaler
224222metadata:
225223 name: myapp-hpa
@@ -331,7 +329,7 @@ This is an example of an HPA that will scale based on `requests-per-second` for
331329an ingress called `myapp`.
332330
333331` ` ` yaml
334- apiVersion: autoscaling/v2beta2
332+ apiVersion: autoscaling/v2
335333kind: HorizontalPodAutoscaler
336334metadata:
337335 name: myapp-hpa
@@ -365,7 +363,7 @@ This is an example of an HPA that will scale based on `requests-per-second` for
365363a routegroup called `myapp`.
366364
367365` ` ` yaml
368- apiVersion: autoscaling/v2beta2
366+ apiVersion: autoscaling/v2
369367kind: HorizontalPodAutoscaler
370368metadata:
371369 name: myapp-hpa
@@ -426,7 +424,7 @@ the query name which will be associated with the result of the query. This
426424allows having multiple flux queries associated with a single HPA.
427425
428426` ` ` yaml
429- apiVersion: autoscaling/v2beta2
427+ apiVersion: autoscaling/v2
430428kind: HorizontalPodAutoscaler
431429metadata:
432430 name: myapp-hpa
@@ -514,7 +512,7 @@ This is an example of an HPA that will scale based on the length of an SQS
514512queue.
515513
516514` ` ` yaml
517- apiVersion: autoscaling/v2beta2
515+ apiVersion: autoscaling/v2
518516kind: HorizontalPodAutoscaler
519517metadata:
520518 name: myapp-hpa
@@ -566,7 +564,7 @@ This is an example of an HPA that will scale based on the specified value
566564exposed by a ZMON check with id `1234`.
567565
568566` ` ` yaml
569- apiVersion: autoscaling/v2beta2
567+ apiVersion: autoscaling/v2
570568kind: HorizontalPodAutoscaler
571569metadata:
572570 name: myapp-hpa
@@ -663,7 +661,7 @@ This is an example of using the HTTP collector to collect metrics from a json
663661metrics endpoint specified in the annotations.
664662
665663` ` ` yaml
666- apiVersion: autoscaling/v2beta2
664+ apiVersion: autoscaling/v2
667665kind: HorizontalPodAutoscaler
668666metadata:
669667 name: myapp-hpa
@@ -830,7 +828,7 @@ An HPA can reference the deployed `ClusterScalingSchedule` object as
830828this example :
831829
832830` ` ` yaml
833- apiVersion: autoscaling/v2beta2
831+ apiVersion: autoscaling/v2
834832kind: HorizontalPodAutoscaler
835833metadata:
836834 name: "myapp-hpa"
0 commit comments