Update HPA Algorithm Docs for v1.15 (#14728)
Also changes a link to algorithm details from initial design proposal in Github.
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
2a0f39fb41
commit
d9b19701c3
@@ -81,7 +81,7 @@ controlled by the php-apache deployment we created in the first step of these in
|
|||||||
Roughly speaking, HPA will increase and decrease the number of replicas
|
Roughly speaking, HPA will increase and decrease the number of replicas
|
||||||
(via the deployment) to maintain an average CPU utilization across all Pods of 50%
|
(via the deployment) to maintain an average CPU utilization across all Pods of 50%
|
||||||
(since each pod requests 200 milli-cores by [kubectl run](https://github.com/kubernetes/kubernetes/blob/{{< param "githubbranch" >}}/docs/user-guide/kubectl/kubectl_run.md), this means average CPU usage of 100 milli-cores).
|
(since each pod requests 200 milli-cores by [kubectl run](https://github.com/kubernetes/kubernetes/blob/{{< param "githubbranch" >}}/docs/user-guide/kubectl/kubectl_run.md), this means average CPU usage of 100 milli-cores).
|
||||||
See [here](https://git.k8s.io/community/contributors/design-proposals/autoscaling/horizontal-pod-autoscaler.md#autoscaling-algorithm) for more details on the algorithm.
|
See [here](/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details) for more details on the algorithm.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl autoscale deployment php-apache --cpu-percent=50 --min=1 --max=10
|
kubectl autoscale deployment php-apache --cpu-percent=50 --min=1 --max=10
|
||||||
|
|||||||
@@ -155,9 +155,12 @@ used.
|
|||||||
|
|
||||||
If multiple metrics are specified in a HorizontalPodAutoscaler, this
|
If multiple metrics are specified in a HorizontalPodAutoscaler, this
|
||||||
calculation is done for each metric, and then the largest of the desired
|
calculation is done for each metric, and then the largest of the desired
|
||||||
replica counts is chosen. If any of those metrics cannot be converted
|
replica counts is chosen. If any of these metrics cannot be converted
|
||||||
into a desired replica count (e.g. due to an error fetching the metrics
|
into a desired replica count (e.g. due to an error fetching the metrics
|
||||||
from the metrics APIs), scaling is skipped.
|
from the metrics APIs) and a scale down is suggested by the metrics which
|
||||||
|
can be fetched, scaling is skipped. This means that the HPA is still capable
|
||||||
|
of scaling up if one or more metrics give a `desiredReplicas` greater than
|
||||||
|
the current value.
|
||||||
|
|
||||||
Finally, just before HPA scales the target, the scale recommendation is recorded. The
|
Finally, just before HPA scales the target, the scale recommendation is recorded. The
|
||||||
controller considers all recommendations within a configurable window choosing the
|
controller considers all recommendations within a configurable window choosing the
|
||||||
|
|||||||
Reference in New Issue
Block a user