Uninstalling the OLM objects

If you want to completely remove the IBM Cloud Pak® for Data software from your cluster, you must remove the Operator Lifecycle Manager (OLM) objects, such as operators, operator subscriptions, catalog sources, and cluster service versions.

Who needs to complete this task?
A user with the appropriate permissions to manage OLM objects must complete this task.
When do you need to complete this task?
Complete this task only if you want to completely remove the IBM Cloud Pak for Data software from your cluster.

About this task

Use the cpd-cli manage delete-olm-artifacts command to remove the following OLM objects for the specified components:

  • Catalog sources
  • Cluster service versions
  • Operator subscriptions

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

Procedure

  1. 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.
  2. Delete the OLM objects for the specified components.

    The command that you run depends on where the operators are installed:


    Express installations (all of the operators are in the same project)
    cpd-cli manage delete-olm-artifacts
    Tip: If you want to preview the oc commands that the cpd-cli manage delete-olm-artifacts 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.


    Specialized installations (the operators are installed in two different projects)
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_OPS}
    Tip: If you want to preview the oc commands that the cpd-cli manage delete-olm-artifacts 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.


Results

The OLM objects are uninstalled from the appropriate projects:
Express installations
  • The operators and operator subscriptions are removed from the ibm-common-services project.
  • The catalog sources are removed from the openshift-marketplace project.

Specialized installations
  • The Cloud Pak for Data operators and operator subscriptions are removed from the ${PROJECT_CPD_OPS} project.
  • The catalog sources are removed from the openshift-marketplace project.
  • The IBM Cloud Pak foundational services operators, catalog sources, and operator subscriptions are removed from the ibm-common-services project.

    If you installed the scheduling service, the operators, catalog sources, and operator subscriptions for this component is also removed from the ibm-common-services project.