Uninstalling IBM Knowledge Catalog

An instance administrator can uninstall IBM Knowledge Catalog.

Who needs to complete this task?

Instance administrator To uninstall IBM Knowledge Catalog, you must be an instance administrator. An instance administrator has permission to manage software in the following projects:

The operators project for the instance

The operators for this instance of IBM® Software Hub are installed in the operators project. In the uninstall commands, the ${PROJECT_CPD_INST_OPERATORS} environment variable refers to the operators project.

The operands project for the instance

The IBM Software Hub control plane and the services for this instance of IBM Software Hub are installed in the operands project. In the uninstall commands, the ${PROJECT_CPD_INST_OPERANDS} environment variable refers to the operands project.

When do you need to complete this task?

Complete this task if you want to remove IBM Knowledge Catalog from an instance of IBM Software Hub.

Repeat as needed If you are responsible for multiple instances of IBM Software Hub, you can repeat this task to remove other instances of IBM Knowledge Catalog on the cluster.

Information you need to complete this task

Review the following information before you uninstall IBM Knowledge Catalog:

Environment variables
The commands in this task use environment variables so that you can run the commands exactly as written.
  • If you don't have the script that defines the environment variables, see Setting up installation environment variables.
  • To use the environment variables from the script, you must source the environment variables before you run the commands in this task. For example, run:
    source ./cpd_vars.sh

Procedure

Complete the following tasks to uninstall IBM Knowledge Catalog:

  1. Selecting the IBM Knowledge Catalog edition to uninstall
  2. Uninstalling the service

Selecting the IBM Knowledge Catalog edition to uninstall

IBM Knowledge Catalog is available in three different editions. You must specify which edition to uninstall.

Set the IKC_TYPE environment variable to the edition of IBM Knowledge Catalog that you want to uninstall:

IBM Knowledge Catalog
export IKC_TYPE=wkc
IBM Knowledge Catalog Standard
export IKC_TYPE=ikc_standard
IBM Knowledge Catalog Premium
export IKC_TYPE=ikc_premium

Uninstalling the service

To uninstall IBM Knowledge Catalog:

  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. Run the delete command for the custom resource for IBM Knowledge Catalog with the --preview option set to true.
    cpd-cli manage uninstall-components \
    --instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --components=${IKC_TYPE} \
    --include_dependency=true \
    --preview=true

    The preview option generates a file that you can check to see which services will be removed. With --include_dependency=true, you include the dependencies. If you do not want to remove the dependencies when you remove IBM Knowledge Catalog, either omit the --include_dependency option or set it to false.

  3. Delete the custom resource for IBM Knowledge Catalog. Based on your review of the generated preview file, select the appropriate setting for the --include_dependency option. If you want to delete any dependencies together with IBM Knowledge Catalog, run the command with the --include_dependency=true setting.
    cpd-cli manage uninstall-components \
    --instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --components=${IKC_TYPE} \
    
    Wait for the cpd-cli to return the following message:
    [SUCCESS]... The uninstall-components command ran successfully
  4. If IBM Knowledge Catalog was upgraded from earlier version, you might need to delete the Db2uCluster.
    1. Find the db2ucluster name:
      oc get db2ucluster -n ${PROJECT_CPD_INST_OPERANDS}
    2. If it still exists, delete it:
      oc delete db2ucluster <db2ucluster name> -n ${PROJECT_CPD_INST_OPERANDS}