From 51c621a6baddfa93185bf9a8981d9654c716d98e Mon Sep 17 00:00:00 2001 From: Sam Wheating Date: Mon, 19 Jul 2021 10:07:51 -0700 Subject: [PATCH 1/3] Fixing improper sentence in HPA documentation --- .../docs/tasks/run-application/horizontal-pod-autoscale.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 5e94027423..ed095fa0cd 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md @@ -198,9 +198,8 @@ The detailed documentation of `kubectl autoscale` can be found [here](/docs/refe ## Autoscaling during rolling update -Currently in Kubernetes, it is possible to perform a rolling update by using the deployment object, which manages the underlying replica sets for you. -Horizontal Pod Autoscaler only supports the latter approach: the Horizontal Pod Autoscaler is bound to the deployment object, -it sets the size for the deployment object, and the deployment is responsible for setting sizes of underlying replica sets. +Currently in Kubernetes, a rolling update is performed using a deployment object, which manages the underlying replica sets for you. +A Horizontal Pod Autoscaler is bound to a single deployment object - it sets the size for the deployment object, and the deployment is responsible for setting sizes of underlying replica sets. Horizontal Pod Autoscaler does not work with rolling update using direct manipulation of replication controllers, i.e. you cannot bind a Horizontal Pod Autoscaler to a replication controller and do rolling update. From e4d7ffb6d653cb80a9b5a6cd50dfb4885aadd856 Mon Sep 17 00:00:00 2001 From: Sam Wheating Date: Mon, 26 Jul 2021 09:14:03 -0700 Subject: [PATCH 2/3] Update content/en/docs/tasks/run-application/horizontal-pod-autoscale.md Co-authored-by: Tim Bannister --- .../run-application/horizontal-pod-autoscale.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 ed095fa0cd..bc32cf97f2 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md @@ -198,8 +198,17 @@ The detailed documentation of `kubectl autoscale` can be found [here](/docs/refe ## Autoscaling during rolling update -Currently in Kubernetes, a rolling update is performed using a deployment object, which manages the underlying replica sets for you. -A Horizontal Pod Autoscaler is bound to a single deployment object - it sets the size for the deployment object, and the deployment is responsible for setting sizes of underlying replica sets. +Kubernetes lets you perform a rolling update on a Deployment. In that +case, the Deployment manages the underlying ReplicaSets for you. +When you configure autoscaling for a Deployment, you bind a +HorizontalPodAutoscaler to a single Deployment. The HorizontalPodAutoscaler +manages the `replicas` field of the Deployment. The deployment controller is responsible +for setting the `replicas` of the underlying ReplicaSets so that they add up to a suitable +number during the rollout and also afterwards. + +If you perform a rolling update of a StatefulSet that has an autoscaled number of +replicas, the StatefulSet directly manages its set of Pods (there is no intermediate resource +similar to ReplicaSet). Horizontal Pod Autoscaler does not work with rolling update using direct manipulation of replication controllers, i.e. you cannot bind a Horizontal Pod Autoscaler to a replication controller and do rolling update. From 498647c4388636ccbbabb9fdbdc4f9f2aba67072 Mon Sep 17 00:00:00 2001 From: Sam Wheating Date: Mon, 26 Jul 2021 09:17:10 -0700 Subject: [PATCH 3/3] Removing paragraph about ReplicationController --- .../docs/tasks/run-application/horizontal-pod-autoscale.md | 5 ----- 1 file changed, 5 deletions(-) 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 bc32cf97f2..f1d008edce 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md @@ -210,11 +210,6 @@ If you perform a rolling update of a StatefulSet that has an autoscaled number o replicas, the StatefulSet directly manages its set of Pods (there is no intermediate resource similar to ReplicaSet). -Horizontal Pod Autoscaler does not work with rolling update using direct manipulation of replication controllers, -i.e. you cannot bind a Horizontal Pod Autoscaler to a replication controller and do rolling update. -The reason this doesn't work is that when rolling update creates a new replication controller, -the Horizontal Pod Autoscaler will not be bound to the new replication controller. - ## Support for cooldown/delay When managing the scale of a group of replicas using the Horizontal Pod Autoscaler,