-
Scroll or type a keyword into the Filter by keyword box (in this case,
jaeger
) to find the Operator you want and click on it. -
Click Uninstall.
To delete (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 CSV and deployment, then delete Operator’s entry in the CatalogSourceConfig. The following text describes how to delete Operators from a cluster using either the web console or the command line.
To delete an installed Operator from the selected namespace through the web console, follow these steps:
Select the Operator to delete. There are two paths to do this:
From the Catalog → OperatorHub page:
Scroll or type a keyword into the Filter by keyword box (in this case,
jaeger
) to find the Operator you want and click on it.
Click Uninstall.
From the Catalog → Operator Management page:
Select the namespace where the Operator is installed from the Project list.
For cluster-wide Operators, the default is openshift-operators
.
From the Operator Subscriptions tab, find the Operator you want to delete (in
this example, jaeger
) and click the Options menu at the end of its
entry.
Click Remove Subscription.
When prompted by the Remove Subscription window, optionally select the Also completely remove the jaeger 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.
Select Remove. This Operator will stop running and no longer receive updates.
Although the Operator is no longer installed or receiving updates, that Operator will still appear on the Operator Catalogs list, ready to re-subscribe. To remove the Operator from that listing, you can delete the Operator’s entry in the CatalogSourceConfig from the command line (as shown in last step of "Deleting operators from a cluster using the CLI"). |
Instead of using the OpenShift Container Platform web console, you can delete an Operator
from your cluster by using the CLI. You do this by deleting the Subscription and
ClusterServiceVersion from the targetNamespace
, then editing the
CatalogSourceConfig to remove the Operator’s package name.
Access to an OpenShift Container Platform cluster using an account with
cluster-admin
permissions.
Install the oc
command on your local system.
In this example, there are two Operators (Jaeger and Descheduler) installed in
the openshift-operators
namespace. The goal is to remove Jaeger without
removing Descheduler.
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
Delete the Operator’s Subscription (for example, jaeger
):
$ oc delete subscription jaeger -n openshift-operators subscription.operators.coreos.com "jaeger" deleted
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
Display the contents of the CatalogSourceConfig
resource and review the list
of packages in the spec
section:
$ oc get catalogsourceconfig -n openshift-marketplace \ installed-community-openshift-operators -o yaml
For example, the spec section might appear as follows:
spec:
csDisplayName: Community Operators
csPublisher: Community
packages: jaeger,descheduler
targetNamespace: openshift-operators
Remove the Operator from the CatalogSourceConfig in one of two ways:
If you have multiple Operators, edit the CatalogSourceConfig resource and remove the Operator’s package:
$ oc edit catalogsourceconfig -n openshift-marketplace \ installed-community-openshift-operators
Remove the package from the packages
line, as shown:
packages: descheduler
Save the change and the marketplace-operator
will reconcile the
CatalogSourceConfig.
If there is only one Operator in the CatalogSourceConfig, you can remove it by deleting the entire CatalogSourceConfig as follows:
$ oc delete catalogsourceconfig -n openshift-marketplace \ installed-community-openshift-operators