If you want to uninstall IBM Cloud Pak® for Data, you must uninstall the running instance of the control plane and services.
- Who needs to complete this task?
- A user with the appropriate permissions to manage projects must complete this task.
- When do you need to complete this task?
- Complete this task only if you want to 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.
About this task
If you plan to uninstall the Cloud Pak for Data
operators, you must uninstall all instances of Cloud Pak for Data
before you uninstall the operators.
Use the cpd-cli
manage
delete-cr
command to remove the custom resources.
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.
To uninstall Cloud Pak for Data
components:
-
Run the
cpd-cli
manage
login-to-ocp
command to log in to the cluster as a user with
sufficient permissions to complete this task. For example:
cpd-cli manage login-to-ocp \
--username=${OCP_USERNAME} \
--password=${OCP_PASSWORD} \
--server=${OCP_URL}
Tip: The login-to-ocp
command takes the same
input as the oc login
command. Run oc login --help
for
details.
- Determine which components are installed in the project:
cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE}
- Set the
COMPONENTS
environment variable to
include the components that were returned by the get-cr-status
command:
export COMPONENTS=<components>
- Delete the custom resources for the specified components in the project.
cpd-cli manage delete-cr \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--components=${COMPONENTS}
Tip: If you want to preview the
oc
commands that the
cpd-cli
manage
delete-cr
will issue on your behalf, you can run the command with
--preview=true
.
The oc
commands are
saved to the preview.sh
file in the cpd-cli-workspace/olm-utils-workspace/work
directory.
- Re-run
get-cr-status
to confirm that all of
the components were removed:
cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE}
- Clean up any remaining resources in the project:
- Set the
RESOURCE_LIST
environment variable:
export RESOURCE_LIST=configmaps,persistentvolumeclaims,pods,secret,serviceaccounts,Service,StatefulSets,deployment,job,cronjob,ReplicaSet,Route,RoleBinding,Role,PodDisruptionBudget,OperandRequest
- Run the following command to identify any remaining resources in the
PROJECT_CPD_INSTANCE
project:
oc get ${RESOURCE_LIST} -n ${PROJECT_CPD_INSTANCE} --ignore-not-found
- Delete any resources that are returned.
The format of the command
is:
oc delete <object-type> <object-name>
- Remove the
PROJECT_CPD_INSTANCE
project:
oc delete project PROJECT_CPD_INSTANCE
The components are uninstalled from the ${PROJECT_CPD_INSTANCE}
project.
What to do next
If you want to completely remove the Cloud Pak for Data software from your cluster, you must complete
Uninstalling the OLM objects.