Skip to content

Commit a566df2

Browse files
committed
HPA autoscaling/v2beta2 is deprecated; change to v2
1 parent 2085023 commit a566df2

6 files changed

+13
-14
lines changed

modules/nodes-pods-autoscaling-about.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ The following metrics are supported by horizontal pod autoscalers:
4444

4545
|CPU utilization
4646
|Number of CPU cores used. Can be used to calculate a percentage of the pod's requested CPU.
47-
|`autoscaling/v1`, `autoscaling/v2beta2`
47+
|`autoscaling/v1`, `autoscaling/v2`
4848

4949
|Memory utilization
5050
|Amount of memory used. Can be used to calculate a percentage of the pod's requested memory.
51-
|`autoscaling/v2beta2`
51+
|`autoscaling/v2`
5252
|===
5353

5454
[IMPORTANT]

modules/nodes-pods-autoscaling-creating-cpu.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ $ oc autoscale deployment/image-registry --min=5 --max=7 --cpu-percent=75
8989
+
9090
[source,yaml,options="nowrap"]
9191
----
92-
apiVersion: autoscaling/v2beta2 <1>
92+
apiVersion: autoscaling/v2 <1>
9393
kind: HorizontalPodAutoscaler
9494
metadata:
9595
name: cpu-autoscale <2>
@@ -109,7 +109,7 @@ spec:
109109
type: AverageValue <10>
110110
averageValue: 500m <11>
111111
----
112-
<1> Use the `autoscaling/v2beta2` API.
112+
<1> Use the `autoscaling/v2` API.
113113
<2> Specify a name for this horizontal pod autoscaler object.
114114
<3> Specify the API version of the object to scale:
115115
* For a `Deployment`, `ReplicaSet`, `Statefulset` object, use `apps/v1`.

modules/nodes-pods-autoscaling-creating-memory.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To create a horizontal pod autoscaler for memory utilization:
7070
+
7171
[source,yaml,options="nowrap"]
7272
----
73-
apiVersion: autoscaling/v2beta2 <1>
73+
apiVersion: autoscaling/v2 <1>
7474
kind: HorizontalPodAutoscaler
7575
metadata:
7676
name: hpa-resource-metrics-memory <2>
@@ -101,7 +101,7 @@ spec:
101101
periodSeconds: 60
102102
selectPolicy: Max
103103
----
104-
<1> Use the `autoscaling/v2beta2` API.
104+
<1> Use the `autoscaling/v2` API.
105105
<2> Specify a name for this horizontal pod autoscaler object.
106106
<3> Specify the API version of the object to scale:
107107
* For a `Deployment`, `ReplicaSet`, or `Statefulset` object, use `apps/v1`.
@@ -122,7 +122,7 @@ spec:
122122
+
123123
[source,yaml,options="nowrap"]
124124
----
125-
apiVersion: autoscaling/v2beta2 <1>
125+
apiVersion: autoscaling/v2 <1>
126126
kind: HorizontalPodAutoscaler
127127
metadata:
128128
name: memory-autoscale <2>
@@ -153,7 +153,7 @@ spec:
153153
periodSeconds: 120
154154
selectPolicy: Max
155155
----
156-
<1> Use the `autoscaling/v2beta2` API.
156+
<1> Use the `autoscaling/v2` API.
157157
<2> Specify a name for this horizontal pod autoscaler object.
158158
<3> Specify the API version of the object to scale:
159159
* For a ReplicationController, use `v1`.

modules/nodes-pods-autoscaling-policies.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
[id="nodes-pods-autoscaling-policies_{context}"]
66
= Scaling policies
77

8-
The `autoscaling/v2beta2` API allows you to add _scaling policies_ to a horizontal pod autoscaler. A scaling policy controls how the {product-title} horizontal pod autoscaler (HPA) scales pods. Scaling policies allow you to restrict the rate that HPAs scale pods up or down by setting a specific number or specific percentage to scale in a specified period of time. You can also define a _stabilization window_, which uses previously computed desired states to control scaling if the metrics are fluctuating. You can create multiple policies for the same scaling direction, and determine which policy is used, based on the amount of change. You can also restrict the scaling by timed iterations. The HPA scales pods during an iteration, then performs scaling, as needed, in further iterations.
8+
The `autoscaling/v2` API allows you to add _scaling policies_ to a horizontal pod autoscaler. A scaling policy controls how the {product-title} horizontal pod autoscaler (HPA) scales pods. Scaling policies allow you to restrict the rate that HPAs scale pods up or down by setting a specific number or specific percentage to scale in a specified period of time. You can also define a _stabilization window_, which uses previously computed desired states to control scaling if the metrics are fluctuating. You can create multiple policies for the same scaling direction, and determine which policy is used, based on the amount of change. You can also restrict the scaling by timed iterations. The HPA scales pods during an iteration, then performs scaling, as needed, in further iterations.
99

1010
.Sample HPA object with a scaling policy
1111
[source, yaml]
1212
----
13-
apiVersion: autoscaling/v2beta2
13+
apiVersion: autoscaling/v2
1414
kind: HorizontalPodAutoscaler
1515
metadata:
1616
name: hpa-resource-metrics-memory
@@ -54,7 +54,7 @@ spec:
5454
.Example policy for scaling down
5555
[source,yaml]
5656
----
57-
apiVersion: autoscaling/v2beta2
57+
apiVersion: autoscaling/v2
5858
kind: HorizontalPodAutoscaler
5959
metadata:
6060
name: hpa-resource-metrics-memory

modules/nodes-pods-autoscaling-status-about.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ You can use the status conditions set to determine
1111
whether or not the horizontal pod autoscaler (HPA) is able to scale and whether or not it is currently restricted
1212
in any way.
1313

14-
The HPA status conditions are available with the `v2beta1` version of the
14+
The HPA status conditions are available with the `v2` version of the
1515
autoscaling API.
1616

1717
The HPA responds with the following status conditions:

modules/nodes-pods-autoscaling-status-viewing.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ You can view the status conditions set on a pod by the horizontal pod autoscaler
1111

1212
[NOTE]
1313
====
14-
The horizontal pod autoscaler status conditions are available with the `v2beta1` version of the
15-
autoscaling API.
14+
The horizontal pod autoscaler status conditions are available with the `v2` version of the autoscaling API.
1615
====
1716

1817
.Prerequisites

0 commit comments

Comments
 (0)