Chapter 8. Uninstall the Red Hat OpenShift Logging Operator
You can uninstall the Red Hat OpenShift Logging Operator from your cluster.
8.1. Uninstall the Red Hat OpenShift Logging Operator Copy linkLink copied to clipboard!
You can uninstall Red Hat OpenShift Logging Operator by using either the OpenShift CLI (oc) or the Red Hat OpenShift Logging web console.
8.1.1. Delete the Red Hat OpenShift Logging Operator by using the CLI Copy linkLink copied to clipboard!
Delete the Red Hat OpenShift Logging Operator by using the OpenShift CLI (oc).
Prerequisites
- You have administrator permissions.
-
You installed the OpenShift CLI (
oc).
Procedure
Delete the
ClusterLogForwardercustom resource (CR) by running the following command:$ oc delete ClusterLogForwarder instance -n openshift-loggingChange
instanceto the name of yourClusterLogForwarderCR if you have used a different name.Delete the service account by running the following commands:
$ oc adm policy remove-cluster-role-from-user lokistack-tenant-logs -z logging-collector -n openshift-logging$ oc adm policy remove-cluster-role-from-user collect-application-logs -z logging-collector -n openshift-logging$ oc adm policy remove-cluster-role-from-user collect-infrastructure-logs -z logging-collector -n openshift-logging$ oc adm policy remove-cluster-role-from-user collect-audit-logs -z logging-collector -n openshift-logging$ oc adm policy remove-cluster-role-from-user logging-collector-logs-writer -z logging-collector -n openshift-logging$ oc delete serviceaccount logging-collector -n openshift-loggingDelete the
LogFileMetricExporterresource if you have deployed it by running the following command:$ oc -n openshift-logging delete LogFileMetricExporter --allCheck the current version of the subscribed Red Hat OpenShift Logging Operator in the
currentCSVfield by running the following command:$ oc get csv -n openshift-logging | grep cluster-loggingYou get an output similar to the following example:
cluster-logging.v6.2.4 Red Hat OpenShift Logging 6.2.4 cluster-logging.v6.2.3 SucceededNote the first field in the output, it indicates the
currentCSVvalue.Delete the subscription associated with the Red Hat OpenShift Logging Operator by running the following command:
$ oc delete subscriptions.operators.coreos.com cluster-logging -n openshift-loggingDelete the
CSVobject for Red Hat OpenShift Logging Operator in the target namespace using thecurrentCSVvalue obtained from the earlier step:$ oc delete csv cluster-logging.v6.2.4 -n openshift-loggingUninstall the Red Hat OpenShift Logging Operator by running the following command:
$ oc delete OperatorGroup <name> -n openshift-logging
8.1.2. Delete the Red Hat OpenShift Logging Operator by using the web console Copy linkLink copied to clipboard!
You can delete the Red Hat OpenShift Logging Operator by using the Red Hat OpenShift Logging web console.
Prerequisites
- You have administrator permissions.
- You have access to the Red Hat OpenShift Logging web console.
Procedure
-
In the web console, go to Operators
Installed Operators. -
Find Red Hat OpenShift Logging Operator in the list and click
next to it, then click Uninstall Operator.
- In the pop-up select Delete all operand instances for this operator and click Uninstall.