This is a cache of https://docs.openshift.com/rosa/nodes/cma/nodes-cma-autoscaling-custom-removing.html. It is a snapshot of the page at 2024-11-25T03:20:25.492+0000.
Removing the Custom Metrics Autoscaler Operator - Automatically scaling pods with the Custom Metrics Autoscaler Operator | Nodes | Red Hat OpenShift <strong>service</strong> on AWS
×

You can remove the custom metrics autoscaler from your Red Hat OpenShift service on AWS cluster. After removing the Custom Metrics Autoscaler Operator, remove other components associated with the Operator to avoid potential issues.

Delete the KedaController custom resource (CR) first. If you do not delete the KedaController CR, Red Hat OpenShift service on AWS can hang when you delete the keda project. If you delete the Custom Metrics Autoscaler Operator before deleting the CR, you are not able to delete the CR.

Uninstalling the Custom Metrics Autoscaler Operator

Use the following procedure to remove the custom metrics autoscaler from your Red Hat OpenShift service on AWS cluster.

Prerequisites
  • The Custom Metrics Autoscaler Operator must be installed.

Procedure
  1. In the Red Hat OpenShift service on AWS web console, click OperatorsInstalled Operators.

  2. Switch to the keda project.

  3. Remove the KedaController custom resource.

    1. Find the CustomMetricsAutoscaler Operator and click the KedaController tab.

    2. Find the custom resource, and then click Delete KedaController.

    3. Click Uninstall.

  4. Remove the Custom Metrics Autoscaler Operator:

    1. Click OperatorsInstalled Operators.

    2. Find the CustomMetricsAutoscaler Operator and click the Options menu kebab and select Uninstall Operator.

    3. Click Uninstall.

  5. Optional: Use the OpenShift CLI to remove the custom metrics autoscaler components:

    1. Delete the custom metrics autoscaler CRDs:

      • clustertriggerauthentications.keda.sh

      • kedacontrollers.keda.sh

      • scaledjobs.keda.sh

      • scaledobjects.keda.sh

      • triggerauthentications.keda.sh

      $ oc delete crd clustertriggerauthentications.keda.sh kedacontrollers.keda.sh scaledjobs.keda.sh scaledobjects.keda.sh triggerauthentications.keda.sh

      Deleting the CRDs removes the associated roles, cluster roles, and role bindings. However, there might be a few cluster roles that must be manually deleted.

    2. List any custom metrics autoscaler cluster roles:

      $ oc get clusterrole | grep keda.sh
    3. Delete the listed custom metrics autoscaler cluster roles. For example:

      $ oc delete clusterrole.keda.sh-v1alpha1-admin
    4. List any custom metrics autoscaler cluster role bindings:

      $ oc get clusterrolebinding | grep keda.sh
    5. Delete the listed custom metrics autoscaler cluster role bindings. For example:

      $ oc delete clusterrolebinding.keda.sh-v1alpha1-admin
  6. Delete the custom metrics autoscaler project:

    $ oc delete project keda
  7. Delete the Cluster Metric Autoscaler Operator:

    $ oc delete operator/openshift-custom-metrics-autoscaler-operator.keda