此内容没有您所选择的语言版本。
Chapter 12. Uninstalling Red Hat OpenShift AI Self-Managed
This section shows how to use the OpenShift command-line interface (CLI) to uninstall the Red Hat OpenShift AI Operator and any OpenShift AI components installed and managed by the Operator.
Using the CLI is the recommended way to uninstall the Operator. Depending on your version of OpenShift, using the web console to perform the uninstallation might not prompt you to uninstall all associated components. This could leave you unclear about the final state of your cluster.
12.1. Understanding the uninstallation process 复制链接链接已复制到粘贴板!
Installing Red Hat OpenShift AI created several custom resource instances on your OpenShift cluster for various components of OpenShift AI. After installation, users likely created several additional resources while using OpenShift AI. Uninstalling OpenShift AI removes the resources that were created by the Operator, but retains the resources created by users to prevent inadvertently deleting information you might want.
What is deleted
Uninstalling OpenShift AI removes the following resources from your OpenShift cluster:
-
DataScienceClustercustom resource instance and the custom resource instances it created for each component -
DSCInitializationcustom resource instance -
Authcustom resource instance created during or after installation -
FeatureTrackercustom resource instances created during or after installation -
ServiceMeshcustom resource instance created by the Operator during or after installation -
KNativeServingcustom resource instance created by the Operator during or after installation -
redhat-ods-applications,redhat-ods-monitoring, andrhods-notebooksnamespaces created by the Operator -
Workloads in the
rhods-notebooksnamespace -
Subscription,ClusterServiceVersion, andInstallPlanobjects -
KfDefobject (version 1 Operator only)
The redhat-ods-monitoring namespace exists only if you upgraded from a version earlier than OpenShift AI 2.18.
What might remain
Uninstalling OpenShift AI retains the following resources in your OpenShift cluster:
- Data science projects created by users
- Custom resource instances created by users
- Custom resource definitions (CRDs) created by users or by the Operator
While these resources might still remain in your OpenShift cluster, they are not functional. After uninstalling, Red Hat recommends that you review the data science projects and custom resources in your OpenShift cluster and delete anything no longer in use to prevent potential issues, such as pipelines that cannot run, notebooks that cannot be undeployed, or models that cannot be undeployed.
Additional resources
The following procedure shows how to use the OpenShift command-line interface (CLI) to uninstall the Red Hat OpenShift AI Operator and any OpenShift AI components installed and managed by the Operator.
Prerequisites
- You have cluster administrator privileges for your OpenShift cluster.
- You have downloaded and installed the OpenShift command-line interface (CLI). See Installing the OpenShift CLI.
- You have backed up the persistent disks or volumes used by your persistent volume claims (PVCs).
Procedure
- Open a new terminal window.
In the OpenShift command-line interface (CLI), log in to your OpenShift cluster as a cluster administrator, as shown in the following example:
oc login <openshift_cluster_url> -u system:admin
$ oc login <openshift_cluster_url> -u system:adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
ConfigMapobject for deletion of the Red Hat OpenShift AI Operator.oc create configmap delete-self-managed-odh -n redhat-ods-operator
$ oc create configmap delete-self-managed-odh -n redhat-ods-operatorCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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
$ oc label configmap/delete-self-managed-odh api.openshift.com/addon-managed-odh-delete=true -n redhat-ods-operatorCopy to Clipboard Copied! Toggle word wrap Toggle overflow When all objects associated with the Operator are removed, delete the
redhat-ods-operatorproject.Set an environment variable for the
redhat-ods-applicationsproject.PROJECT_NAME=redhat-ods-applications
$ PROJECT_NAME=redhat-ods-applicationsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Wait until the
redhat-ods-applicationsproject has been deleted.while oc get project $PROJECT_NAME &> /dev/null; do echo "The $PROJECT_NAME project still exists" sleep 1 done echo "The $PROJECT_NAME project no longer exists"
while oc get project $PROJECT_NAME &> /dev/null; do echo "The $PROJECT_NAME project still exists" sleep 1 done echo "The $PROJECT_NAME project no longer exists"Copy to Clipboard Copied! Toggle word wrap Toggle overflow When the
redhat-ods-applicationsproject has been deleted, you see the following output.The redhat-ods-applications project no longer exists
The redhat-ods-applications project no longer existsCopy to Clipboard Copied! Toggle word wrap Toggle overflow When the
redhat-ods-applicationsproject has been deleted, delete theredhat-ods-operatorproject.oc delete namespace redhat-ods-operator
$ oc delete namespace redhat-ods-operatorCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Confirm that the
rhods-operatorsubscription no longer exists.oc get subscriptions --all-namespaces | grep rhods-operator
$ oc get subscriptions --all-namespaces | grep rhods-operatorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm that the following projects no longer exist.
-
redhat-ods-applications -
redhat-ods-monitoring -
redhat-ods-operator rhods-notebooksoc get namespaces | grep -e redhat-ods* -e rhods*
$ oc get namespaces | grep -e redhat-ods* -e rhods*Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
redhat-ods-monitoringproject existed only if the Operator created it before OpenShift AI version 2.18.The
rhods-notebooksproject existed only if you installed the workbenches component of OpenShift AI. See Installing and managing Red Hat OpenShift AI components.
-