From d9b19701c3f0356a8b5553b69d35fcb39549ce53 Mon Sep 17 00:00:00 2001 From: Guy Templeton Date: Tue, 11 Jun 2019 03:04:17 +0100 Subject: [PATCH] Update HPA Algorithm Docs for v1.15 (#14728) Also changes a link to algorithm details from initial design proposal in Github. --- .../horizontal-pod-autoscale-walkthrough.md | 2 +- .../docs/tasks/run-application/horizontal-pod-autoscale.md | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md index d6f95f0651..fe280a47de 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md @@ -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 (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). -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 kubectl autoscale deployment php-apache --cpu-percent=50 --min=1 --max=10 diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md index 37528b3052..4fa90e7323 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md @@ -155,9 +155,12 @@ used. If multiple metrics are specified in a HorizontalPodAutoscaler, this 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 -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 controller considers all recommendations within a configurable window choosing the