Disable the cluster autoscaler
To disable the cluster autoscaler, you delete the corresponding ClusterAutoscaler resource.
|
|
Disabling the cluster autoscaler disables autoscaling on the cluster, even if the cluster has existing machine autoscalers. |
-
List the
ClusterAutoscalerresource for the cluster by running the following command:$ oc get ClusterAutoscalerExample outputNAME AGE default 42m -
Optional: Create a YAML file backup of the
ClusterAutoscalerCR by running the following command:$ oc get ClusterAutoscaler/default \ -o yaml> <cluster_autoscaler_backup_name>.yamlwhere:
- <cluster_autoscaler_backup_name>
-
Specifies the file name in which to store the backup.
-
Delete the
ClusterAutoscalerCR by running the following command:$ oc delete ClusterAutoscaler/defaultExample outputclusterautoscaler.autoscaling.openshift.io "default" deleted
-
To verify that the cluster autoscaler is disabled, run the following command:
$ oc get ClusterAutoscalerExpected outputNo resources found
-
Disabling the cluster autoscaler by deleting the
ClusterAutoscalerCR prevents the cluster from autoscaling but does not delete any existing machine autoscalers on the cluster. To clean up unneeded machine autoscalers, see "Disabling a machine autoscaler". -
If you need to re-enable the cluster autoscaler, use the
<cluster_autoscaler_name_backup>.yamlbackup file and follow the instructions in "Deploying a cluster autoscaler".