Chapter 1. Uninstalling OpenShift Data Science self-managed

You can use the Red Hat OpenShift CLI (oc) to safely uninstall Red Hat OpenShift Data Science self-managed from your OpenShift Container Platform cluster. When you uninstall Red Hat OpenShift Data Science self-managed using the web console, only the operator is removed. As a result, other OpenShift Data Science components are not uninstalled, leaving the cluster in an inconsistent state. To avoid this scenario, use the Red Hat OpenShift CLI (oc) to uninstall Red Hat OpenShift Data Science self-managed from your OpenShift Container Platform cluster.

Prerequisites

  • You have access to an OpenShift cluster using an account with cluster-admin permissions.
  • You must have installed the OpenShift CLI (oc).
  • You have backed up the persistent disk or volume containing your Persistent Volume Claims (PVCs).

Procedure

  1. Log into OpenShift Container Platform from the CLI.
  2. Create a ConfigMap to delete the Red Hat OpenShift Data Science Operator:

    oc create configmap delete-self-managed-odh -n redhat-ods-operator
  3. To delete the rhods-operator, set the addon-managed-odh-delete label to true:

    oc label configmap/delete-self-managed-odh api.openshift.com/addon-managed-odh-delete=true -n redhat-ods-operator
  4. When all the objects are removed, delete the redhat-ods-operator namespace:

    1. Set the name of the project to check:

      PROJECT_NAME=redhat-ods-applications
    2. Continue checking until the project no longer exists:

      while oc get project $PROJECT_NAME &> /dev/null; do
        echo "$PROJECT_NAME still exists"
        sleep 1
      done
      echo "$PROJECT_NAME no longer exists"
    3. Delete the redhat-ods-operator namespace:

      oc delete namespace redhat-ods-operator

Verification

  • Confirm that the rhods-operator no longer exists:

    oc get subscriptions --all-namespaces | grep rhods-operator
  • Confirm that the following project namespaces no longer exist:

    • redhat-ods-applications
    • redhat-ods-monitoring
    • redhat-ods-operator

      oc get namespaces | grep redhat-ods*

Additional resources