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.
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.
To uninstall an instance of Cloud Pak for Data:
-
Log the
cpd-cli
in to the
Red Hat®
OpenShift® Container Platform cluster:
Remember:
CPDM_OC_LOGIN
is an alias for the cpd-cli
manage
login-to-ocp
command.
- Determine which components are installed in the project:
cpd-cli manage list-deployed-components \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
- Set the
COMPONENTS
environment variable to
include the components that were returned by the list-deployed-components
command:
export COMPONENTS=<components>
- 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
- 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}
- Uninstall the operators for the instance:
cpd-cli manage delete-olm-artifacts \
--cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
--delete_all_components=true
- Check whether the projects for the instance still exist:
- 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.
- If the project still exists, delete it:
oc delete project ${PROJECT_CPD_INST_OPERANDS}
- 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.
- If the project still exists, delete it:
oc delete project ${PROJECT_CPD_INST_OPERATORS}