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-adminpermissions. -
You must have installed the OpenShift CLI (
oc). - You have backed up the persistent disk or volume containing your Persistent Volume Claims (PVCs).
Procedure
- Log into OpenShift Container Platform from the CLI.
Create a ConfigMap to delete the Red Hat OpenShift Data Science Operator:
oc create configmap delete-self-managed-odh -n redhat-ods-operator
To delete the
rhods-operator, set theaddon-managed-odh-deletelabel totrue:oc label configmap/delete-self-managed-odh api.openshift.com/addon-managed-odh-delete=true -n redhat-ods-operator
When all the objects are removed, delete the
redhat-ods-operatornamespace:Set the name of the project to check:
PROJECT_NAME=redhat-ods-applications
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"
Delete the
redhat-ods-operatornamespace:oc delete namespace redhat-ods-operator
Verification
Confirm that the
rhods-operatorno 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-operatoroc get namespaces | grep redhat-ods*
-
Additional resources