Uninstalling an instance of IBM Cloud Pak for Data

If you want to uninstall an instance of IBM Cloud Pak for Data, you must uninstall the running instance of the control plane and services and the operators associated with the instance.

Who needs to complete this task?

Instance administrator An instance administrator can complete this task.

When do you need to complete this task?
Complete this task only if you want to completely uninstall IBM Cloud Pak for Data.

If you installed multiple instances of Cloud Pak for Data on the cluster, you must complete this task for each instance of Cloud Pak for Data that you want to uninstall.

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

If there are any projects tethered to this instance of Cloud Pak for Data, complete Untethering projects from the Cloud Pak for Data control plane before you uninstall the instance.

About this task

Use the cpd-cli manage delete-cr command to remove the custom resources and the cpd-cli manage delete-olm-artifacts command to remove the operators.

The instructions assume that you are removing all of the components at the same time, which enables you to complete the task in fewer steps.

Procedure

To uninstall an instance of Cloud Pak for Data:

  1. Log the cpd-cli in to the Red Hat® OpenShift® Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. Determine which components are installed in the project:
    cpd-cli manage list-deployed-components \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  3. Set the COMPONENTS environment variable to include the components that were returned by the list-deployed-components command:
    export COMPONENTS=<components>
  4. Delete the custom resources for the specified components in the project.
    Tip: Before you run this command against your cluster, you can preview the oc commands that this command will issue on your behalf by running the command with the --preview=true option.

    The oc commands are saved to the preview.sh file in the work directory.

    cpd-cli manage delete-cr \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --components=${COMPONENTS} \
    --include_dependency=true
  5. Run get-cr-status to confirm that all of the components were removed:
    cpd-cli manage get-cr-status \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  6. Uninstall the operators for the instance:
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
    --delete_all_components=true
  7. Check whether the projects for the instance still exist:
    1. Check whether the operands project still exists:
      oc get project ${PROJECT_CPD_INST_OPERANDS}
      • If the project does not exist, the command returns the following message: Error from server (Not Found)
      • If the project still exists, the command returns information about the project.
    2. If the project still exists, delete it:
      oc delete project ${PROJECT_CPD_INST_OPERANDS}
    3. Check whether the operators project still exists:
      oc get project ${PROJECT_CPD_INST_OPERATORS}
      • If the project does not exist, the command returns the following message: Error from server (Not Found)
      • If the project still exists, the command returns information about the project.
    4. If the project still exists, delete it:
      oc delete project ${PROJECT_CPD_INST_OPERATORS}