Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 14. Uninstalling Logging


You can remove logging from your OpenShift Dedicated cluster by removing installed Operators and related custom resources (CRs).

14.1. Uninstalling the logging

You can stop aggregating logs by deleting the Red Hat OpenShift Logging Operator and the ClusterLogging custom resource (CR).

Prerequisites

  • You have administrator permissions.
  • You have access to the Administrator perspective of the OpenShift Dedicated web console.

Procedure

  1. Go to the Administration Custom Resource Definitions page, and click ClusterLogging.
  2. On the Custom Resource Definition Details page, click Instances.
  3. Click the options menu kebab next to the instance, and click Delete ClusterLogging.
  4. Go to the Administration Custom Resource Definitions page.
  5. Click the options menu kebab next to ClusterLogging, and select Delete Custom Resource Definition.

    Warning

    Deleting the ClusterLogging CR does not remove the persistent volume claims (PVCs). To delete the remaining PVCs, persistent volumes (PVs), and associated data, you must take further action. Releasing or deleting PVCs can delete PVs and cause data loss.

  6. If you have created a ClusterLogForwarder CR, click the options menu kebab next to ClusterLogForwarder, and then click Delete Custom Resource Definition.
  7. Go to the Operators Installed Operators page.
  8. Click the options menu kebab next to the Red Hat OpenShift Logging Operator, and then click Uninstall Operator.
  9. Optional: Delete the openshift-logging project.

    Warning

    Deleting the openshift-logging project deletes everything in that namespace, including any persistent volume claims (PVCs). If you want to preserve logging data, do not delete the openshift-logging project.

    1. Go to the Home Projects page.
    2. Click the options menu kebab next to the openshift-logging project, and then click Delete Project.
    3. Confirm the deletion by typing openshift-logging in the dialog box, and then click Delete.

14.2. Deleting logging PVCs

To keep persistent volume claims (PVCs) for reuse with other pods, keep the labels or PVC names that you need to reclaim the PVCs. If you do not want to keep the PVCs, you can delete them. If you want to recover storage space, you can also delete the persistent volumes (PVs).

Prerequisites

  • You have administrator permissions.
  • You have access to the Administrator perspective of the OpenShift Dedicated web console.

Procedure

  1. Go to the Storage Persistent Volume Claims page.
  2. Click the options menu kebab next to each PVC, and select Delete Persistent Volume Claim.

14.3. Uninstalling Loki

Prerequisites

  • You have administrator permissions.
  • You have access to the Administrator perspective of the OpenShift Dedicated web console.
  • If you have not already removed the Red Hat OpenShift Logging Operator and related resources, you have removed references to LokiStack from the ClusterLogging custom resource.

Procedure

  1. Go to the Administration Custom Resource Definitions page, and click LokiStack.
  2. On the Custom Resource Definition Details page, click Instances.
  3. Click the options menu kebab next to the instance, and then click Delete LokiStack.
  4. Go to the Administration Custom Resource Definitions page.
  5. Click the options menu kebab next to LokiStack, and select Delete Custom Resource Definition.
  6. Delete the object storage secret.
  7. Go to the Operators Installed Operators page.
  8. Click the options menu kebab next to the Loki Operator, and then click Uninstall Operator.
  9. Optional: Delete the openshift-operators-redhat project.

    Important

    Do not delete the openshift-operators-redhat project if other global Operators are installed in this namespace.

    1. Go to the Home Projects page.
    2. Click the options menu kebab next to the openshift-operators-redhat project, and then click Delete Project.
    3. Confirm the deletion by typing openshift-operators-redhat in the dialog box, and then click Delete.

14.4. Uninstalling Elasticsearch

Prerequisites

  • You have administrator permissions.
  • You have access to the Administrator perspective of the OpenShift Dedicated web console.
  • If you have not already removed the Red Hat OpenShift Logging Operator and related resources, you must remove references to Elasticsearch from the ClusterLogging custom resource.

Procedure

  1. Go to the Administration Custom Resource Definitions page, and click Elasticsearch.
  2. On the Custom Resource Definition Details page, click Instances.
  3. Click the options menu kebab next to the instance, and then click Delete Elasticsearch.
  4. Go to the Administration Custom Resource Definitions page.
  5. Click the options menu kebab next to Elasticsearch, and select Delete Custom Resource Definition.
  6. Delete the object storage secret.
  7. Go to the Operators Installed Operators page.
  8. Click the options menu kebab next to the OpenShift Elasticsearch Operator, and then click Uninstall Operator.
  9. Optional: Delete the openshift-operators-redhat project.

    Important

    Do not delete the openshift-operators-redhat project if other global Operators are installed in this namespace.

    1. Go to the Home Projects page.
    2. Click the options menu kebab next to the openshift-operators-redhat project, and then click Delete Project.
    3. Confirm the deletion by typing openshift-operators-redhat in the dialog box, and then click Delete.

14.5. Deleting Operators from a cluster using the CLI

Cluster administrators can delete installed Operators from a selected namespace by using the CLI.

Prerequisites

  • You have access to an OpenShift Dedicated cluster using an account with dedicated-admin permissions.
  • The OpenShift CLI (oc) is installed on your workstation.

Procedure

  1. Ensure the latest version of the subscribed operator (for example, serverless-operator) is identified in the currentCSV field.

    $ oc get subscription.operators.coreos.com serverless-operator -n openshift-serverless -o yaml | grep currentCSV

    Example output

      currentCSV: serverless-operator.v1.28.0

  2. Delete the subscription (for example, serverless-operator):

    $ oc delete subscription.operators.coreos.com serverless-operator -n openshift-serverless

    Example output

    subscription.operators.coreos.com "serverless-operator" deleted

  3. Delete the CSV for the Operator in the target namespace using the currentCSV value from the previous step:

    $ oc delete clusterserviceversion serverless-operator.v1.28.0 -n openshift-serverless

    Example output

    clusterserviceversion.operators.coreos.com "serverless-operator.v1.28.0" deleted

Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.