Uninstalling Cloud Pak for Data

You can uninstall the Cloud Pak for Data control plane and services from Red Hat® OpenShift®.

Before you begin

Required role: To complete this task, you must be an administrator of the project (namespace) where Cloud Pak for Data is deployed.

Ensure that Mac OS or Linux machine where you will run the commands meets the following requirements:
  • Can connect to the cluster.
  • Has the oc command-line interface.
  • Has the Cloud Pak for Data command-line interface.

Procedure

To remove the Cloud Pak for Data control plane:

  1. Log in to your Red Hat OpenShift cluster as a project administrator:
    oc login OpenShift_URL:port
  2. Change to the project where the Cloud Pak for Data control plane is deployed:
    oc project Project_Name
  3. Run the following command to preview the changes that will be made to the cluster when you remove the Cloud Pak for Data control plane:
    ./cpd-cli uninstall \ 
    --namespace Project_Name \
    --assembly lite \
    --uninstall-dry-run
  4. Run the following command to remove the Cloud Pak for Data control plane:
    ./cpd-cli uninstall \ 
    --namespace Project_Name \
    --assembly lite
  5. When the uninstallation completes, enter the following command to verify that the lite assembly is no longer listed:
    oc get CPDInstall cr-cpdinstall -n Project -o yaml

A cluster administrator can remove and clean all of Cloud Pak for Data from OpenShift by completing the following steps.

Important: Deleting the namespace removes all deployments from all services from that namespace. If you need to remove just one service and there are multiple assemblies installed, follow instructions to uninstall just that one service.

  1. List all Persistent Volumes in the Cloud Pak for Data project and remove them.
  2. On the OpenShift cluster, stop all pods that are running in the Cloud Pak for Data project.
  3. Delete the project and all cluster scoped items from the OpenShift cluster:
    oc delete namespace Project
    oc delete scc cpd-user-scc
    oc delete scc cpd-zensys-scc
    oc delete crd cpdinstalls.cpd.ibm.com

    Replace Project with the name of your Cloud Pak for Data project.

  4. Verify that all Cloud Pak for Data Persistent Volumes are gone:
    oc get pv

    If any still exist, delete them:

    oc delete pv pv-name

    Replace pv-name with each remaining Cloud Pak for Data Persistent Volume.