Clarify HPA Scaling Policies
Update content/en/docs/tasks/run-application/horizontal-pod-autoscale.md Co-authored-by: Tim Bannister <tim@scalefactory.com>pull/24262/head
parent
9e01fb5560
commit
5b15a7108f
|
@ -319,7 +319,7 @@ For instance if there are 80 replicas and the target has to be scaled down to 10
|
||||||
then during the first step 8 replicas will be reduced. In the next iteration when the number
|
then during the first step 8 replicas will be reduced. In the next iteration when the number
|
||||||
of replicas is 72, 10% of the pods is 7.2 but the number is rounded up to 8. On each loop of
|
of replicas is 72, 10% of the pods is 7.2 but the number is rounded up to 8. On each loop of
|
||||||
the autoscaler controller the number of pods to be change is re-calculated based on the number
|
the autoscaler controller the number of pods to be change is re-calculated based on the number
|
||||||
of current replicas. When the number of replicas falls below 40 the first policy_(Pods)_ is applied
|
of current replicas. When the number of replicas falls below 40 the first policy _(Pods)_ is applied
|
||||||
and 4 replicas will be reduced at a time.
|
and 4 replicas will be reduced at a time.
|
||||||
|
|
||||||
`periodSeconds` indicates the length of time in the past for which the policy must hold true.
|
`periodSeconds` indicates the length of time in the past for which the policy must hold true.
|
||||||
|
@ -328,7 +328,7 @@ allows at most 10% of the current replicas to be scaled down in one minute.
|
||||||
|
|
||||||
The policy selection can be changed by specifying the `selectPolicy` field for a scaling
|
The policy selection can be changed by specifying the `selectPolicy` field for a scaling
|
||||||
direction. By setting the value to `Min` which would select the policy which allows the
|
direction. By setting the value to `Min` which would select the policy which allows the
|
||||||
smallest change in the replica count. Setting the value to `Disabled` completely disabled
|
smallest change in the replica count. Setting the value to `Disabled` completely disables
|
||||||
scaling in that direction.
|
scaling in that direction.
|
||||||
|
|
||||||
### Stabilization Window
|
### Stabilization Window
|
||||||
|
@ -405,8 +405,9 @@ behavior:
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
```
|
```
|
||||||
|
|
||||||
To allow a final drop of 5 pods, another policy can be added with a selection
|
To ensure that no more than 5 Pods are removed per minute, you can add a second scale-down
|
||||||
strategy of maximum:
|
policy with a fixed size of 5, and set `selectPolicy` to minimum. Setting `selectPolicy` to `Min` means
|
||||||
|
that the autoscaler chooses the policy that affects the smallest number of Pods:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
behavior:
|
behavior:
|
||||||
|
@ -418,7 +419,7 @@ behavior:
|
||||||
- type: Pods
|
- type: Pods
|
||||||
value: 5
|
value: 5
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
selectPolicy: Max
|
selectPolicy: Min
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example: disable scale down
|
### Example: disable scale down
|
||||||
|
@ -441,4 +442,3 @@ behavior:
|
||||||
* kubectl autoscale command: [kubectl autoscale](/docs/reference/generated/kubectl/kubectl-commands/#autoscale).
|
* kubectl autoscale command: [kubectl autoscale](/docs/reference/generated/kubectl/kubectl-commands/#autoscale).
|
||||||
* Usage example of [Horizontal Pod Autoscaler](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/).
|
* Usage example of [Horizontal Pod Autoscaler](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/).
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue