@@ -62,7 +62,7 @@ or the custom metrics API (for all other metrics).
62
62
63
63
* For object metrics and external metrics, a single metric is fetched, which describes
64
64
the object in question. This metric is compared to the target
65
- value, to produce a ratio as above. In the ` autoscaling/v2beta2 ` API
65
+ value, to produce a ratio as above. In the ` autoscaling/v2 ` API
66
66
version, this value can optionally be divided by the number of Pods before the
67
67
comparison is made.
68
68
@@ -161,18 +161,17 @@ fluctuating metric values.
161
161
162
162
## API Object
163
163
164
- The Horizontal Pod Autoscaler is an API resource in the Kubernetes ` autoscaling ` API group.
165
- The current stable version, which only includes support for CPU autoscaling,
166
- can be found in the ` autoscaling/v1 ` API version.
167
-
168
- The beta version, which includes support for scaling on memory and custom metrics,
169
- can be found in ` autoscaling/v2beta2 ` . The new fields introduced in ` autoscaling/v2beta2 `
170
- are preserved as annotations when working with ` autoscaling/v1 ` .
164
+ The Horizontal Pod Autoscaler is an API resource in the Kubernetes
165
+ ` autoscaling ` API group. The current stable version can be found in
166
+ the ` autoscaling/v2 ` API version which includes support for scaling on
167
+ memory and custom metrics. The new fields introduced in
168
+ ` autoscaling/v2 ` are preserved as annotations when working with
169
+ ` autoscaling/v1 ` .
171
170
172
171
When you create a HorizontalPodAutoscaler API object, make sure the name specified is a valid
173
172
[ DNS subdomain name] ( /docs/concepts/overview/working-with-objects/names#dns-subdomain-names ) .
174
173
More details about the API object can be found at
175
- [ HorizontalPodAutoscaler Object] (/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#horizontalpodautoscaler-v1 -autoscaling).
174
+ [ HorizontalPodAutoscaler Object] (/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#horizontalpodautoscaler-v2 -autoscaling).
176
175
177
176
178
177
## Support for Horizontal Pod Autoscaler in kubectl
@@ -299,7 +298,7 @@ the old container name from the HPA specification.
299
298
300
299
# # Support for multiple metrics
301
300
302
- Kubernetes 1.6 adds support for scaling based on multiple metrics. You can use the `autoscaling/v2beta2 ` API
301
+ Kubernetes 1.6 adds support for scaling based on multiple metrics. You can use the `autoscaling/v2 ` API
303
302
version to specify multiple metrics for the Horizontal Pod Autoscaler to scale on. Then, the Horizontal Pod
304
303
Autoscaler controller will evaluate each metric, and propose a new scale based on that metric. The largest of the
305
304
proposed scales will be used as the new scale.
@@ -313,9 +312,11 @@ custom metrics is still available, these metrics will not be available for use b
313
312
annotations for specifying which custom metrics to scale on are no longer honored by the Horizontal Pod Autoscaler controller.
314
313
{{< /note >}}
315
314
316
- Kubernetes 1.6 adds support for making use of custom metrics in the Horizontal Pod Autoscaler.
317
- You can add custom metrics for the Horizontal Pod Autoscaler to use in the `autoscaling/v2beta2` API.
318
- Kubernetes then queries the new custom metrics API to fetch the values of the appropriate custom metrics.
315
+ You can also use a HorizontalPodAutoscaler to change the scale of a
316
+ workload based on custom metrics. You can add custom metrics for the
317
+ Horizontal Pod Autoscaler to use in the `autoscaling/v2` API.
318
+ Kubernetes then queries the new custom metrics API to fetch the values
319
+ of the appropriate custom metrics.
319
320
320
321
See [Support for metrics APIs](#support-for-metrics-apis) for the requirements.
321
322
@@ -349,12 +350,14 @@ and [the walkthrough for using external metrics](/docs/tasks/run-application/hor
349
350
350
351
Starting from
351
352
[v1.18](https://github.com/kubernetes/enhancements/blob/master/keps/sig-autoscaling/853-configurable-hpa-scale-velocity/README.md)
352
- the `v2beta2` API allows scaling behavior to be configured through the HPA
353
- ` behavior` field. Behaviors are specified separately for scaling up and down in
354
- ` scaleUp` or `scaleDown` section under the `behavior` field. A stabilization
355
- window can be specified for both directions which prevents the flapping of the
356
- number of the replicas in the scaling target. Similarly specifying scaling
357
- policies controls the rate of change of replicas while scaling.
353
+ the `v2beta2` API (and from v1.23 the `v2` API) allows scaling
354
+ behavior to be configured through the HPA `behavior` field. Behaviors
355
+ are specified separately for scaling up and down in `scaleUp` or
356
+ ` scaleDown` section under the `behavior` field. A stabilization window
357
+ can be specified for both directions which prevents the flapping of
358
+ the number of the replicas in the scaling target. Similarly specifying
359
+ scaling policies controls the rate of change of replicas while
360
+ scaling.
358
361
359
362
# ## Scaling Policies
360
363
0 commit comments