From c734060e6f0d188a89aab16c5a320179bbdb53cf Mon Sep 17 00:00:00 2001 From: Hyunchel Kim Date: Wed, 31 Aug 2016 14:45:10 -0500 Subject: [PATCH 1/3] Add missing commas, fix typos --- docs/user-guide/horizontal-pod-autoscaling/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/user-guide/horizontal-pod-autoscaling/index.md b/docs/user-guide/horizontal-pod-autoscaling/index.md index 181c1ba5f7..abd6d8314d 100644 --- a/docs/user-guide/horizontal-pod-autoscaling/index.md +++ b/docs/user-guide/horizontal-pod-autoscaling/index.md @@ -120,13 +120,13 @@ all running pods. Example: alpha/target.custom-metrics.podautoscaler.kubernetes.io: '{"items":[{"name":"qps", "value": "10"}]}' ``` -In this case if there are 4 pods running and each of them reports qps metric to be equal to 15 HPA will start 2 additional pods so there will be 6 pods in total. If there are multiple metrics passed in the annotation or CPU is configured as well then HPA will use the biggest +In this case, if there are 4 pods running and each of them reports qps metric to be equal to 15, HPA will start 2 additional pods so there will be 6 pods in total. If there are multiple metrics passed in the annotation or CPU is configured as well then HPA will use the biggest number of replicas that comes from the calculations. -At this moment even if target CPU utilization is not specified a default of 80% will be used. -To calculate number of desired replicas based only on custom metrics CPU utilization -target should be set to a very large value (e.g. 100000%). Then CPU-related logic -will want only 1 replica, leaving the decision about higher replica count to cusom metrics (and min/max limits). +At this moment, even if CPU utilization target is not specified, a default of 80% will be used. +To calculate number of desired replicas based only on custom metrics, CPU utilization +target should be set to a very large value (e.g. 100000%). +Then CPU utilization target will unlikely be reached, leaving the decision on desired number of replicas to the custom metrics (and min/max limits). ## Further reading From ceb5189d488d09cb4f14665db100eb4c6654bf4e Mon Sep 17 00:00:00 2001 From: Hyunchel Kim Date: Thu, 1 Sep 2016 08:51:08 -0500 Subject: [PATCH 2/3] Update sentences based on reviewed comments --- docs/user-guide/horizontal-pod-autoscaling/index.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/user-guide/horizontal-pod-autoscaling/index.md b/docs/user-guide/horizontal-pod-autoscaling/index.md index abd6d8314d..a789a9c5fc 100644 --- a/docs/user-guide/horizontal-pod-autoscaling/index.md +++ b/docs/user-guide/horizontal-pod-autoscaling/index.md @@ -120,13 +120,14 @@ all running pods. Example: alpha/target.custom-metrics.podautoscaler.kubernetes.io: '{"items":[{"name":"qps", "value": "10"}]}' ``` -In this case, if there are 4 pods running and each of them reports qps metric to be equal to 15, HPA will start 2 additional pods so there will be 6 pods in total. If there are multiple metrics passed in the annotation or CPU is configured as well then HPA will use the biggest -number of replicas that comes from the calculations. +In this case, if there are four pods running and each pods reports a QPS metric of 15 or higher, horizontal pod autoscaling will start two additional pods (for a total of six pods running). + +If you specify multiple metrics in your annotation or if you set a target CPU utilization, horizontal pod autoscaling will scale to according to the metric that requires the highest number of replicas. + +If you do not specify a target for CPU utilization, Kubernetes defaults to an 80% utilization threshold for horizontal pod autoscaling. + +If you want to ensure that horizontal pod autoscaling calculates the number of required replicas based only on custom metrics, you should set the CPU utilization target to a very large value (such as 100000%). As this level of CPU utilization isn't possible, horizontal pod autoscaling will calculate based only on the custom metrics (and min/max limits). -At this moment, even if CPU utilization target is not specified, a default of 80% will be used. -To calculate number of desired replicas based only on custom metrics, CPU utilization -target should be set to a very large value (e.g. 100000%). -Then CPU utilization target will unlikely be reached, leaving the decision on desired number of replicas to the custom metrics (and min/max limits). ## Further reading From 820fa73edff8648c0671d1a1185ce9ff71b7c8b1 Mon Sep 17 00:00:00 2001 From: Hyunchel Kim Date: Tue, 6 Sep 2016 08:44:42 -0500 Subject: [PATCH 3/3] Fix typo --- docs/user-guide/horizontal-pod-autoscaling/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/horizontal-pod-autoscaling/index.md b/docs/user-guide/horizontal-pod-autoscaling/index.md index a789a9c5fc..fbdd11360a 100644 --- a/docs/user-guide/horizontal-pod-autoscaling/index.md +++ b/docs/user-guide/horizontal-pod-autoscaling/index.md @@ -120,7 +120,7 @@ all running pods. Example: alpha/target.custom-metrics.podautoscaler.kubernetes.io: '{"items":[{"name":"qps", "value": "10"}]}' ``` -In this case, if there are four pods running and each pods reports a QPS metric of 15 or higher, horizontal pod autoscaling will start two additional pods (for a total of six pods running). +In this case, if there are four pods running and each pod reports a QPS metric of 15 or higher, horizontal pod autoscaling will start two additional pods (for a total of six pods running). If you specify multiple metrics in your annotation or if you set a target CPU utilization, horizontal pod autoscaling will scale to according to the metric that requires the highest number of replicas.