---
title: Removing the Custom Metrics Autoscaler Operator
---

# Removing the Custom Metrics Autoscaler Operator {#nodes-cma-autoscaling-custom-removing}

You can remove the custom metrics autoscaler from your OpenShift Container Platform cluster. After removing the Custom Metrics Autoscaler Operator, remove other components associated with the Operator to avoid potential issues.

> [!NOTE]
> Delete the `KedaController` custom resource (CR) first. If you do not delete the `KedaController` CR, OpenShift Container Platform can hang when you delete the `openshift-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 {#nodes-cma-autoscaling-custom-uninstalling_nodes-cma-autoscaling-custom-removing}

Use the following procedure to remove the custom metrics autoscaler from your OpenShift Container Platform cluster.

**Prerequisites**

- The Custom Metrics Autoscaler Operator must be installed.

**Procedure**

1. In the OpenShift Container Platform web console, click **Ecosystem** → **Installed Operators**.
2. Switch to the **openshift-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 **Ecosystem** → **Installed Operators**.
   2. Find the **CustomMetricsAutoscaler**  Operator and click the Options menu ![](/openshift-docs-markdown/images/kebab.png "Options menu") 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`

      ```terminal
      $ 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:

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

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

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

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

   ```terminal
   $ oc delete project openshift-keda
   ```
7. Delete the Cluster Metric Autoscaler Operator:

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