You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: machine_management/applying-autoscaling.adoc
+9-49Lines changed: 9 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,12 @@
2
2
[id="applying-autoscaling"]
3
3
= Applying autoscaling to an {product-title} cluster
4
4
include::_attributes/common-attributes.adoc[]
5
-
:context: applying-autoscaling
6
5
6
+
:context: applying-autoscaling
7
7
toc::[]
8
8
9
-
Applying autoscaling to an {product-title} cluster involves deploying a cluster autoscaler and then deploying machine autoscalers for each machine type in your cluster.
9
+
[role="_abstract"]
10
+
Apply autoscaling to an {product-title} cluster to automatically adjust the size of the cluster to meet deployment needs. You can deploy a cluster autoscaler and then deploy machine autoscalers for each machine type in your cluster. After you configure the cluster autoscaler, you must configure at least one machine autoscaler.
10
11
11
12
[IMPORTANT]
12
13
====
@@ -15,73 +16,32 @@ You can configure the cluster autoscaler only in clusters where the Machine API
* After you configure the cluster autoscaler, you must xref:../machine_management/applying-autoscaling.adoc#configuring-machineautoscaler_applying-autoscaling[configure at least one machine autoscaler].
After you deploy the cluster autoscaler, deploy `MachineAutoscaler` resources that reference the compute machine sets that are used to scale the cluster.
50
-
51
-
[IMPORTANT]
52
-
====
53
-
You must deploy at least one `MachineAutoscaler` resource after you deploy the `ClusterAutoscaler` resource.
54
-
====
55
-
56
-
[NOTE]
57
-
====
58
-
You must configure separate resources for each compute machine set. Remember that compute machine sets are different in each region, so consider whether you want to enable machine scaling in multiple regions. The compute machine set that you scale must have at least one machine in it.
Copy file name to clipboardExpand all lines: modules/cluster-autoscaler-about.adoc
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
[id="cluster-autoscaler-about_{context}"]
13
13
= About the cluster autoscaler
14
14
15
+
[role="_abstract"]
15
16
The cluster autoscaler adjusts the size of an {product-title} cluster to meet its current deployment needs. It uses declarative, Kubernetes-style arguments to provide infrastructure management that does not rely on objects of a specific cloud provider. The cluster autoscaler has a cluster scope, and is not associated with a particular namespace.
16
17
ifdef::openshift-rosa-hcp[]
17
18
In {product-title}, the Cluster Autoscaler is fully managed, which means it is hosted along with the control plane.
= Configuring a priority expander for the cluster autoscaler
8
8
9
-
When the cluster autoscaler uses the priority expander, it scales up by using the machine set with the highest user-assigned priority.
10
-
To use this expander, you must create a config map that defines the priority of your machine sets.
11
-
12
-
For each specified priority level, you must create regular expressions to identify machine sets that you want to use when prioritizing a machine set for selection.
13
-
The regular expressions must match the name of any compute machine set that you want the cluster autoscaler to consider for selection.
9
+
[role="_abstract"]
10
+
Configure a priority expander to control which machine set expands when the cluster autoscaler increases the size of the cluster.
11
+
You can create a priority expander config map by listing priority values and regular expressions that define machine sets.
14
12
15
13
.Prerequisites
16
14
@@ -53,23 +51,19 @@ For example, use the regular expression pattern `\*fast*` to match any compute m
53
51
apiVersion: v1
54
52
kind: ConfigMap
55
53
metadata:
56
-
name: cluster-autoscaler-priority-expander # <1>
57
-
namespace: openshift-machine-api # <2>
54
+
name: cluster-autoscaler-priority-expander
55
+
namespace: openshift-machine-api
58
56
data:
59
-
priorities: |- # <3>
57
+
priorities: |-
60
58
10:
61
59
- .*fast.*
62
60
- .*archive.*
63
61
40:
64
62
- .*prod.*
65
63
----
66
-
<1> You must name config map `cluster-autoscaler-priority-expander`.
67
-
<2> You must create the config map in the same namespace as cluster autoscaler pod, which is the `openshift-machine-api` namespace.
68
-
<3> Define the priority of your machine sets.
69
-
+
64
+
Define the priority of your machine sets.
70
65
The `priorities` values must be positive integers.
71
66
The cluster autoscaler uses higher-value priorities before lower-value priorities.
72
-
+
73
67
For each priority level, specify the regular expressions that correspond to the machine sets you want to use.
Copy file name to clipboardExpand all lines: modules/cluster-autoscaler-cr.adoc
+87-47Lines changed: 87 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
[id="cluster-autoscaler-cr_{context}"]
8
8
= Cluster autoscaler resource definition
9
9
10
+
[role="_abstract"]
10
11
This `ClusterAutoscaler` resource definition shows the parameters and sample values for the cluster autoscaler.
11
12
12
13
[NOTE]
@@ -21,80 +22,119 @@ kind: "ClusterAutoscaler"
21
22
metadata:
22
23
name: "default"
23
24
spec:
24
-
podPriorityThreshold: -10 # <1>
25
+
podPriorityThreshold: -10
25
26
resourceLimits:
26
-
maxNodesTotal: 24 # <2>
27
+
maxNodesTotal: 24
27
28
cores:
28
-
min: 8 # <3>
29
-
max: 128 # <4>
29
+
min: 8
30
+
max: 128
30
31
memory:
31
-
min: 4 # <5>
32
-
max: 256 # <6>
32
+
min: 4
33
+
max: 256
33
34
gpus:
34
-
- type: <gpu_type> # <7>
35
-
min: 0 # <8>
36
-
max: 16 # <9>
37
-
logVerbosity: 4 # <10>
38
-
scaleDown: # <11>
39
-
enabled: true # <12>
40
-
delayAfterAdd: 10m # <13>
41
-
delayAfterDelete: 5m # <14>
42
-
delayAfterFailure: 30s # <15>
43
-
unneededTime: 5m # <16>
44
-
utilizationThreshold: "0.4" # <17>
45
-
expanders: ["Random"] # <18>
35
+
- type: <gpu_type>
36
+
min: 0
37
+
max: 16
38
+
logVerbosity: 4
39
+
scaleDown:
40
+
enabled: true
41
+
delayAfterAdd: 10m
42
+
delayAfterDelete: 5m
43
+
delayAfterFailure: 30s
44
+
unneededTime: 5m
45
+
utilizationThreshold: "0.4"
46
+
expanders: ["Random"]
46
47
----
47
-
<1> Specify the priority that a pod must exceed to cause the cluster autoscaler to deploy additional nodes. Enter a 32-bit integer value. The `podPriorityThreshold` value is compared to the value of the `PriorityClass` that you assign to each pod.
48
-
<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.
49
-
<3> Specify the minimum number of cores to deploy in the cluster.
50
-
<4> Specify the maximum number of cores to deploy in the cluster.
51
-
<5> Specify the minimum amount of memory, in GiB, in the cluster.
52
-
<6> Specify the maximum amount of memory, in GiB, in the cluster.
53
-
<7> Optional: To configure the cluster autoscaler to deploy GPU-enabled nodes, specify a `type` value.
48
+
49
+
.Cluster autoscaler parameters
50
+
[cols="1,3",options="header"]
51
+
|===
52
+
|Parameter |Description
53
+
54
+
|`podPriorityThreshold`
55
+
|Specify the priority that a pod must exceed to cause the cluster autoscaler to deploy additional nodes. Enter a 32-bit integer value. The `podPriorityThreshold` value is compared to the value of the `PriorityClass` that you assign to each pod.
56
+
57
+
|`maxNodesTotal`
58
+
|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.
59
+
60
+
|`cores.min`
61
+
|Specify the minimum number of cores to deploy in the cluster.
62
+
63
+
|`cores.max`
64
+
|Specify the maximum number of cores to deploy in the cluster.
65
+
66
+
|`memory.min`
67
+
|Specify the minimum amount of memory, in GiB, in the cluster.
68
+
69
+
|`memory.max`
70
+
|Specify the maximum amount of memory, in GiB, in the cluster.
71
+
72
+
|`gpus.type`
73
+
|Optional: To configure the cluster autoscaler to deploy GPU-enabled nodes, specify a `type` value.
54
74
This value must match the value of the `spec.template.spec.metadata.labels[cluster-api/accelerator]` label in the machine set that manages the GPU-enabled nodes of that type.
55
75
For example, this value might be `nvidia-t4` to represent Nvidia T4 GPUs, or `nvidia-a10g` for A10G GPUs.
56
76
For more information, see "Labeling GPU machine sets for the cluster autoscaler".
57
-
<8> Specify the minimum number of GPUs of the specified type to deploy in the cluster.
58
-
<9> Specify the maximum number of GPUs of the specified type to deploy in the cluster.
59
-
<10> Specify the logging verbosity level between `0` and `10`. The following log level thresholds are provided for guidance:
60
-
+
61
-
--
77
+
78
+
|`gpus.min`
79
+
|Specify the minimum number of GPUs of the specified type to deploy in the cluster.
80
+
81
+
|`gpus.max`
82
+
|Specify the maximum number of GPUs of the specified type to deploy in the cluster.
83
+
84
+
|`logVerbosity`
85
+
a|Specify the logging verbosity level between `0` and `10`. The following log level thresholds are provided for guidance:
86
+
62
87
* `1`: (Default) Basic information about changes.
63
88
* `4`: Debug-level verbosity for troubleshooting typical issues.
If you do not specify a value, the default value of `1` is used.
68
-
<11> In this section, you can specify the period to wait for each action by using any valid link:https://golang.org/pkg/time/#ParseDuration[ParseDuration] interval, including `ns`, `us`, `ms`, `s`, `m`, and `h`.
69
-
<12> Specify whether the cluster autoscaler can remove unnecessary nodes.
70
-
<13> Optional: Specify the period to wait before deleting a node after a node has recently been _added_. If you do not specify a value, the default value of `10m` is used.
71
-
<14> Optional: Specify the period to wait before deleting a node after a node has recently been _deleted_. If you do not specify a value, the default value of `0s` is used.
72
-
<15> Optional: Specify the period to wait before deleting a node after a scale down failure occurred. If you do not specify a value, the default value of `3m` is used.
73
-
<16> Optional: Specify a period of time before an unnecessary node is eligible for deletion. If you do not specify a value, the default value of `10m` is used.
74
-
<17> Optional: Specify the _node utilization level_. Nodes below this utilization level are eligible for deletion.
75
-
+
92
+
93
+
|`scaleDown`
94
+
|In this section, you can specify the period to wait for each action by using any valid link:https://golang.org/pkg/time/#ParseDuration[ParseDuration] interval, including `ns`, `us`, `ms`, `s`, `m`, and `h`.
95
+
96
+
|`scaleDown.enabled`
97
+
|Specify whether the cluster autoscaler can remove unnecessary nodes.
98
+
99
+
|`scaleDown.delayAfterAdd`
100
+
|Optional: Specify the period to wait before deleting a node after a node has recently been _added_. If you do not specify a value, the default value of `10m` is used.
101
+
102
+
|`scaleDown.delayAfterDelete`
103
+
|Optional: Specify the period to wait before deleting a node after a node has recently been _deleted_. If you do not specify a value, the default value of `0s` is used.
104
+
105
+
|`scaleDown.delayAfterFailure`
106
+
|Optional: Specify the period to wait before deleting a node after a scale down failure occurred. If you do not specify a value, the default value of `3m` is used.
107
+
108
+
|`scaleDown.unneededTime`
109
+
|Optional: Specify a period of time before an unnecessary node is eligible for deletion. If you do not specify a value, the default value of `10m` is used.
110
+
111
+
|`scaleDown.utilizationThreshold`
112
+
a|Optional: Specify the _node utilization level_. Nodes below this utilization level are eligible for deletion.
113
+
76
114
The node utilization level is the sum of the requested resources divided by the allocated resources for the node, and must be a value greater than `"0"` but less than `"1"`. If you do not specify a value, the cluster autoscaler uses a default value of `"0.5"`, which corresponds to 50% utilization. You must express this value as a string.
77
-
<18> Optional: Specify any expanders that you want the cluster autoscaler to use.
115
+
116
+
|`expanders`
117
+
a|Optional: Specify any expanders that you want the cluster autoscaler to use.
78
118
The following values are valid:
79
-
+
80
-
--
119
+
81
120
* `LeastWaste`: Selects the machine set that minimizes the idle CPU after scaling.
82
121
If multiple machine sets would yield the same amount of idle CPU, the selection minimizes unused memory.
83
122
* `Priority`: Selects the machine set with the highest user-assigned priority.
84
123
To use this expander, you must create a config map that defines the priority of your machine sets.
85
124
For more information, see "Configuring a priority expander for the cluster autoscaler."
86
125
* `Random`: (Default) Selects the machine set randomly.
87
-
--
88
-
+
126
+
89
127
If you do not specify a value, the default value of `Random` is used.
90
-
+
128
+
91
129
You can specify multiple expanders by using the `[LeastWaste, Priority]` format.
92
130
The cluster autoscaler applies each expander according to the specified order.
93
-
+
131
+
94
132
In the `[LeastWaste, Priority]` example, the cluster autoscaler first evaluates according to the `LeastWaste` criteria.
95
133
If more than one machine set satisfies the `LeastWaste` criteria equally well, the cluster autoscaler then evaluates according to the `Priority` criteria.
96
134
If more than one machine set satisfies all of the specified expanders equally well, the cluster autoscaler selects one to use at random.
97
135
136
+
|===
137
+
98
138
[NOTE]
99
139
====
100
140
When performing a scaling operation, the cluster autoscaler remains within the ranges set in the `ClusterAutoscaler` resource definition, such as the minimum and maximum number of cores to deploy or the amount of memory in the cluster. However, the cluster autoscaler does not correct the current values in your cluster to be within those ranges.
0 commit comments