Este conteúdo não está disponível no idioma selecionado.
Chapter 1. Uninstalling logging
1.1. Uninstalling the Red Hat OpenShift Logging Operator
				You can uninstall Red Hat OpenShift Logging Operator by using either the OpenShift CLI (oc) or the Red Hat OpenShift Logging web console.
			
1.1.1. Deleting the Red Hat OpenShift Logging Operator by using the CLI
					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-logging - $ oc delete ClusterLogForwarder instance -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Change - instanceto the name of your- ClusterLogForwarderCR 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 lokistack-tenant-logs -z logging-collector -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 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-application-logs -z logging-collector -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 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-infrastructure-logs -z logging-collector -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 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 collect-audit-logs -z logging-collector -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - oc adm policy remove-cluster-role-from-user logging-collector-logs-writer -z logging-collector -n openshift-logging - $ oc adm policy remove-cluster-role-from-user logging-collector-logs-writer -z logging-collector -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - oc delete serviceaccount logging-collector -n openshift-logging - $ oc delete serviceaccount logging-collector -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Delete the - LogFileMetricExporterresource if you have deployed it by running the following command:- oc -n openshift-logging delete LogFileMetricExporter --all - $ oc -n openshift-logging delete LogFileMetricExporter --all- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Check 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-logging - $ oc get csv -n openshift-logging | grep cluster-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - cluster-logging.v6.2.4 Red Hat OpenShift Logging 6.2.4 cluster-logging.v6.2.3 Succeeded - cluster-logging.v6.2.4 Red Hat OpenShift Logging 6.2.4 cluster-logging.v6.2.3 Succeeded- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Note 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-logging - $ oc delete subscriptions.operators.coreos.com cluster-logging -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Delete the - CSVobject for Red Hat OpenShift Logging Operator in the target namespace using the- currentCSVvalue obtained from the earlier step:- oc delete csv cluster-logging.v6.2.4 -n openshift-logging - $ oc delete csv cluster-logging.v6.2.4 -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Uninstall the Red Hat OpenShift Logging Operator by running the following command: - oc delete OperatorGroup <name> -n openshift-logging - $ oc delete OperatorGroup <name> -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
1.1.2. Deleting the Red Hat OpenShift Logging Operator by using the web console
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. next to it, then click Uninstall Operator.
- In the pop-up select Delete all operand instances for this operator and click Uninstall.
1.2. Uninstalling the Loki Operator
				You can uninstall Loki Operator by using either the OpenShift CLI (oc) or the Red Hat OpenShift Logging web console. After uninstalling Loki Operator, delete persistent volume claims (PVCs) if you do not want to reuse them in other installations of LokiStack.
			
1.2.1. Deleting the Loki Operator by using the CLI
					Delete the Loki Operator by using the OpenShift CLI (oc).
				
Prerequisites
- You have administrator permissions.
- 
							You installed the OpenShift CLI (oc).
Procedure
- Delete the - LokiStackcustom resource (CR) by running the following command:- oc delete LokiStack logging-loki -n openshift-logging - $ oc delete LokiStack logging-loki -n openshift-logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Substitute - logging-lokiwith the name of your- LokiStackCR if you have used a different name.
- Check the current version of the subscribed Loki Operator in the - currentCSVfield by running the following command:- oc get csv -n openshift-operators-redhat | grep loki-operator - $ oc get csv -n openshift-operators-redhat | grep loki-operator- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - loki-operator.v6.2.4 Loki Operator 6.2.4 loki-operator.v6.2.3 Succeeded - loki-operator.v6.2.4 Loki Operator 6.2.4 loki-operator.v6.2.3 Succeeded- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Note the first field in the output, it indicates the - currentCSVvalue.
- Delete the subscription associated with the Loki Operator by running the following command: - oc delete subscriptions.operators.coreos.com loki-operator -n openshift-operators-redhat - $ oc delete subscriptions.operators.coreos.com loki-operator -n openshift-operators-redhat- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Delete the - CSVobject for Loki Operator in the target namespace using the- currentCSVvalue obtained from the earlier step:- oc delete csv loki-operator.v6.2.4 -n openshift-operators-redhat - $ oc delete csv loki-operator.v6.2.4 -n openshift-operators-redhat- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Uninstall the Loki Operator by running the following command: - oc delete OperatorGroup <name> -n openshift-operators-redhat - $ oc delete OperatorGroup <name> -n openshift-operators-redhat- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
1.2.2. Deleting the Loki Operator by using the web console
Delete the Loki 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 Loki Operator in the list and click 
							 next to it, then click Uninstall Operator. next to it, then click Uninstall Operator.
- In the pop-up, select Delete all operand instances for this operator and click Uninstall.
1.2.3. Deleting logging PVCs by using the CLI
					You can delete persistent volume claims (PVCs) if you do not want to reuse them in other installations of LokiStack by using the OpenShift CLI (oc).
				
Prerequisites
- You have administrator permissions.
- 
							You installed the OpenShift CLI (oc).
Procedure
- Delete logging PVCs by running the following command: - oc -n openshift-logging delete pvc -l app.kubernetes.io/name=lokistack - $ oc -n openshift-logging delete pvc -l app.kubernetes.io/name=lokistack- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
Next steps
1.2.4. Deleting logging PVCs by using the web console
You can delete persistent volume claims (PVCs) if you do not want to reuse them in other installations of LokiStack, by using the 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 the Storage Persistent Volume Claims page. 
- 
							Click 
							 next to each PVC, and select Delete Persistent Volume Claim. next to each PVC, and select Delete Persistent Volume Claim.
Next steps
1.3. Uninstalling the UIPlugin
				You can uninstall UIPlugin by using either the OpenShift CLI (oc) or the Red Hat OpenShift Logging web console.
			
1.3.1. Deleting the UIPlugin by using the CLI
					Delete the UIPlugin by using the OpenShift CLI (oc).
				
Prerequisites
- You have administrator permissions.
- 
							You installed the OpenShift CLI (oc).
Procedure
- Delete the - UIPluginby running the following command:- oc delete uiplugin logging - $ oc delete uiplugin logging- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
1.3.2. Deleting the UIPlugin by using the web console
					Delete the UIPlugin plugin 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. 
- Click Cluster Observability Operator from the Installed Operators list and go to the UIPlugin tab.
- 
							Click 
							 for the UIPlugin logging entry and select Delete UIPlugin. for the UIPlugin logging entry and select Delete UIPlugin.