Skip to content

Commit 4fe039b

Browse files
authored
Merge pull request #19675 from kalexand-rh/BZ1781064
bug 1781064 clarifying max nodes
2 parents bb3e386 + 93a2462 commit 4fe039b

File tree

3 files changed

+27
-23
lines changed

3 files changed

+27
-23
lines changed

modules/cluster-autoscaler-about.adoc

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,43 @@ provide infrastructure management that does not rely on objects of a specific
1111
cloud provider. The ClusterAutoscaler has a cluster scope, and is not associated
1212
with a particular namespace.
1313

14-
The ClusterAutoscaler increases the size of the cluster when there are pods
14+
The ClusterAutoscaler increases the size of the cluster when there are Pods
1515
that failed to schedule on any of the current nodes due to insufficient
1616
resources or when another node is necessary to meet deployment needs. The
1717
ClusterAutoscaler does not increase the cluster resources beyond the limits
1818
that you specify.
1919

20+
[IMPORTANT]
21+
====
22+
Ensure that the `maxNodesTotal` value in the `ClusterAutoscaler` definition that you create is large enough to account for the total possible number of machines in your cluster. This value must encompass the number of control plane machines and the possible number of compute machines that you might scale to.
23+
====
24+
2025
The ClusterAutoscaler decreases the size of the cluster when some nodes are
2126
consistently not needed for a significant period, such as when it has low
22-
resource use and all of its important pods can fit on other nodes.
27+
resource use and all of its important Pods can fit on other nodes.
2328

24-
If the following types of pods are present on a node, the ClusterAutoscaler
29+
If the following types of Pods are present on a node, the ClusterAutoscaler
2530
will not remove the node:
2631

2732
* Pods with restrictive PodDisruptionBudgets (PDBs).
28-
* Kube-system pods that do not run on the node by default.
29-
* Kube-system pods that do not have a PDBB or have a PDB that is too restrictive.
33+
* Kube-system Pods that do not run on the node by default.
34+
* Kube-system Pods that do not have a PDBB or have a PDB that is too restrictive.
3035
* Pods that are not backed by a controller object such as a Deployment,
3136
ReplicaSet, or StatefulSet.
3237
* Pods with local storage.
3338
* Pods that cannot be moved elsewhere because of a lack of resources,
3439
incompatible node selectors or affinity, matching anti-affinity, and so on.
3540
* Unless they also have a `"cluster-autoscaler.kubernetes.io/safe-to-evict": "true"`
36-
annotation, pods that have a `"cluster-autoscaler.kubernetes.io/safe-to-evict": "false"`
41+
annotation, Pods that have a `"cluster-autoscaler.kubernetes.io/safe-to-evict": "false"`
3742
annotation.
3843

3944
If you configure the ClusterAutoscaler, additional usage restrictions apply:
4045

4146
* Do not modify the nodes that are in autoscaled node groups directly. All nodes
4247
within the same node group have the same capacity and labels and run the same
43-
system pods.
44-
* Specify requests for your pods.
45-
* If you have to prevent pods from being deleted too quickly, configure
48+
system Pods.
49+
* Specify requests for your Pods.
50+
* If you have to prevent Pods from being deleted too quickly, configure
4651
appropriate PDBs.
4752
* Confirm that your cloud provider quota is large enough to support the
4853
maximum node pools that you configure.
@@ -56,28 +61,27 @@ number of replicas based on the current CPU load.
5661
If the load increases, the HPA creates new replicas, regardless of the amount
5762
of resources available to the cluster.
5863
If there are not enough resources, the ClusterAutoscaler adds resources so that
59-
the HPA-created pods can run.
64+
the HPA-created Pods can run.
6065
If the load decreases, the HPA stops some replicas. If this action causes some
6166
nodes to be underutilized or completely empty, the ClusterAutoscaler deletes
6267
the unnecessary nodes.
6368

6469

65-
The ClusterAutoscaler takes pod priorities into account. The Pod Priority and
66-
Preemption feature enables scheduling pods based on priorities if the cluster
70+
The ClusterAutoscaler takes Pod priorities into account. The Pod Priority and
71+
Preemption feature enables scheduling Pods based on priorities if the cluster
6772
does not have enough resources, but the ClusterAutoscaler ensures that the
68-
cluster has resources to run all pods. To honor the intention of both features,
73+
cluster has resources to run all Pods. To honor the intention of both features,
6974
the ClusterAutoscaler inclues a priority cutoff function. You can use this cutoff to
70-
schedule "best-effort" pods, which do not cause the ClusterAutoscaler to
75+
schedule "best-effort" Pods, which do not cause the ClusterAutoscaler to
7176
increase resources but instead run only when spare resources are available.
7277

7378
Pods with priority lower than the cutoff value do not cause the cluster to scale
7479
up or prevent the cluster from scaling down. No new nodes are added to run the
75-
pods, and nodes running these pods might be deleted to free resources.
80+
Pods, and nodes running these Pods might be deleted to free resources.
7681

7782
////
7883
Default priority cutoff is 0. It can be changed using `--expendable-pods-priority-cutoff` flag,
7984
but we discourage it.
80-
ClusterAutoscaler also doesn't trigger scale-up if an unschedulable pod is already waiting for a lower
81-
priority pod preemption.
85+
ClusterAutoscaler also doesn't trigger scale-up if an unschedulable Pod is already waiting for a lower
86+
priority Pod preemption.
8287
////
83-

modules/cluster-autoscaler-cr.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
to deploy additional nodes. Enter a 32-bit integer value. The
4444
`podPriorityThreshold` value is compared to the value of the `PriorityClass` that
4545
you assign to each pod.
46-
<2> Specify the maximum number of nodes to deploy.
46+
<2> Specify the maximum number of nodes to deploy. This value is the total number of machines that are deployed in your cluster, not just the ones that the autoscaler controls. Ensure that this value is large enough to account for all of your control plane and compute machines and the total number of replicas that you specify in your `MachineAutoscaler` resources.
4747
<3> Specify the minimum number of cores to deploy.
4848
<4> Specify the maximum number of cores to deploy.
4949
<5> Specify the minimum amount of memory, in GiB, per node.

modules/machine-autoscaler-cr.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ spec:
2828
which MachineSet this MachineAutoscaler scales, specify or include the name of
2929
the MachineSet to scale. The MachineSet name takes the following form:
3030
`<clusterid>-<machineset>-<aws-region-az>`
31-
<2> Specify the minimum number Machines of the specified type to deploy in the
32-
specified AWS zone. Do not set this value to `0`.
33-
<3> Specify the maximum number Machines of the specified type to deploy in the
34-
specified AWS zone.
31+
<2> Specify the minimum number Machines of the specified type that must remain in the
32+
specified AWS zone after the ClusterAutoscaler initiates cluster scaling. Do not set this value to `0`.
33+
<3> Specify the maximum number Machines of the specified type that the ClusterAutoscaler can deploy in the
34+
specified AWS zone after it initiates cluster scaling. Ensure that the `maxNodesTotal` value in the `ClusterAutoscaler` definition is large enough to allow the MachineAutoScaler to deploy this number of machines.
3535
<4> In this section, provide values that describe the existing MachineSet to
3636
scale.
3737
<5> The `kind` parameter value is always `MachineSet`.

0 commit comments

Comments
 (0)