Is it possible to customize the cluster autosclaer on OSD/ROSA?
Environment
- Red Hat OpenShift Service on AWS (ROSA)
- 4
- Red Hat OpenShift Dedicated (OSD)
- 4
- Cluster Autoscaler
Issue
- Can the cluster autoscaler be customized in OSD/ROSA?
- Is it supported to customize
--scan-interval
,--scale-down-utilization-threshold
or other parameters in the Cluster Autoscaler on OSD/ROSA.
Resolution
Starting with a recent release, it is now possible to customize the cluster autoscaler in OSD/ROSA. For doing so, it is needed to first enable the autoscaling of nodes in the cluster:
When the autoscaling is enabled, it is possible to configure it as explained in the documentation (when using the rosa
CLI, version 1.2.27 or newer is needed):
Note: In OSD/ROSA it is not supported to directly change the
clusterautoscaler
resource via theoc
CLI, but usingrosa
CLI or the OCM web console instead.
The parameter scan-interval
is not allowed to be customized on OSD/ROSA. Just used by the default value:
--scan-interval: 10s
How often cluster is reevaluated for scale up or down
The parameters that can be customized are listed in the documentation links for the cluster autoscaling shown above.
Root Cause
Disclaimer: Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.
ROSA provides the Cluster Autoscaler feature through Cluster Autoscaler operator. So it is some different with upstream options of Cluster Autoscaler about that. Refer How does scale-down work? for upstream docs details:
Every 10 seconds (configurable by --scan-interval flag), if no scale-up is needed, Cluster Autoscaler checks which nodes are unneeded.
The scan-interval
flag can not be changed on OSD/ROSA at the moment, as there is no equivalent field in the ClusterAutoscaler
resource.
Diagnostic Steps
Check the configurations allowed by the ClusterAutoscaler
resource (there are no parameters matched with scan-interval
, but for the scale-down-utilization-threshold
):
$ oc get crd clusterautoscalers.autoscaling.openshift.io -o yaml
[...]
$ oc explain clusterautoscalers.spec --recursive
[...]
$ oc explain clusterautoscalers.spec.scaleDown.utilizationThreshold
KIND: ClusterAutoscaler
VERSION: autoscaling.openshift.io/v1
FIELD: utilizationThreshold <string>
DESCRIPTION:
Node utilization level, defined as sum of requested resources divided by
capacity, below which a node can be considered for scale down
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments