To delete, or uninstall, an Operator from your cluster, you can simply delete the Subscription to remove it from the subscribed namespace. If you want a clean slate, you can also remove the Operator’s ClusterServiceVersion (CSV) and Deployment.

The following describes how to delete Operators from a cluster using either the web console or the command line.

Deleting Operators from a cluster using the web console

To delete an installed Operator from the selected namespace through the web console, follow these steps:

Procedure
  1. From the OperatorsInstalled Operators page, scroll or type a keyword into the Filter by name to find the Operator you want. Then, click on it.

  2. On the right-hand side of the Operator Details page, select Uninstall Operator from the Actions drop-down menu.

  3. When prompted by the Remove Operator Subscription window, optionally select the Also completely remove the Operator from the selected namespace check box if you want all components related to the installation to be removed. This removes the CSV, which in turn removes the Pods, Deployments, CRDs, and CRs associated with the Operator.

  4. Select Remove. This Operator will stop running and no longer receive updates.

Deleting Operators from a cluster using the CLI

Instead of using the OpenShift Dedicated web console, you can delete an Operator from your cluster by using the CLI. You do this by deleting the Subscription and CSV from the target namespace.

Prerequisites
  • Access to an OpenShift Dedicated cluster using an account with dedicated-admins-cluster permissions.

  • Install the oc command on your local system.

Procedure
  1. Check the current version of the subscribed Operator (for example, jaeger) in the currentCSV field:

    $ oc get subscription jaeger -n openshift-operators -o yaml | grep currentCSV
      currentCSV: jaeger-operator.v1.8.2
  2. Delete the Operator’s Subscription (for example, jaeger):

    $ oc delete subscription jaeger -n openshift-operators
    subscription.operators.coreos.com "jaeger" deleted
  3. Delete the CSV for the Operator in the target namespace using the currentCSV value from the previous step:

    $ oc delete clusterserviceversion jaeger-operator.v1.8.2 -n openshift-operators
    clusterserviceversion.operators.coreos.com "jaeger-operator.v1.8.2" deleted