Cleaning up Cloud Pak foundational services resources
Remove IBM Cloud Pak® foundational services resources that are no longer needed after the upgrade of Cloud Pak for Integration to 16.1.0.
This task must be performed by a OpenShift cluster administrator. For more information about this role, see OpenShift roles and permissions.
Before you begin
Review Upgrading before you clean up any resources. Ensure you have completed all the upgrade tasks for Cloud Pak for Integration.
Procedure
This procedure removes resources and operators in the ibm-common-services namespace that are no longer needed after the upgrade is complete.
Steps 1-5 apply only to installations in "A single namespace on the cluster" mode. If your installation is in "All namespaces on the cluster" mode, cleanup is done automatically by Cloud Pak foundational services. Begin with step 6.
(A single namespace on the cluster mode, only) Create, and then delete, a temporary
OperandRequestresource in theibm-common-servicesnamespace for Cloud Pak foundational services to remove the resources from the previous version.Create a YAML file called
operand-request.yamlwith the following configuration:apiVersion: operator.ibm.com/v1alpha1 kind: OperandRequest metadata: name: cleanup namespace: ibm-common-services spec: requests: - operands: - name: ibm-iam-operator - name: ibm-commonui-operator - name: ibm-management-ingress-operator - name: ibm-zen-operator - name: ibm-monitoring-grafana-operator registry: common-service registryNamespace: ibm-common-servicesApply the YAML file to the OpenShift cluster:
oc apply -f operand-request.yamlWhen the status of the
OperandRequestchanges toRunning, delete theOperandRequest:oc delete OperandRequest cleanup -n ibm-common-servicesDeleting the
OperandRequeststarts the cleanup of the services and their operators.
To confirm that the actions in the previous step were successful, validate that the services managed by Cloud Pak foundational services are uninstalled. If any of these services remain, you cannot proceed with the remaining steps. Run the following command and review the output:
oc get subscriptions -n ibm-common-servicesIf the output returns any of the following subscriptions, this means that the corresponding services were not cleaned up as expected. This example output is a comprehensive list, and you may not get all of these subscriptions in your response:
% oc get subscriptions -n ibm-common-services NAME PACKAGE SOURCE CHANNEL ibm-cert-manager-operator ibm-cert-manager-operator opencloud-operators v3 ibm-commonui-operator ibm-commonui-operator-app opencloud-operators v3 ibm-iam-operator ibm-iam-operator opencloud-operators v3 ibm-ingress-nginx-operator ibm-ingress-nginx-operator-app opencloud-operators v3 ibm-management-ingress-operator ibm-management-ingress-operator-app opencloud-operators v3 ibm-mongodb-operator ibm-mongodb-operator-app opencloud-operators v3 ibm-monitoring-grafana-operator ibm-monitoring-grafana-operator-app opencloud-operators v3 ibm-platform-api-operator ibm-platform-api-operator-app opencloud-operators v3 ibm-zen-operator ibm-zen-operator opencloud-operators v3 ibm-licensing-operator ibm-licensing-operator opencloud-operators v3Important: If any of these subscriptions are present, do not proceed to the next step. Contact support for further instructions.(A single namespace on the cluster mode, only) Delete the Operand Deployment Lifecycle Manager operator in the
ibm-common-servicesnamespace.Delete the subscription:
oc delete subscription operand-deployment-lifecycle-manager-app -n ibm-common-servicesDelete the CSV.
oc delete csv -l operators.coreos.com/ibm-odlm.ibm-common-services -n ibm-common-services
(A single namespace on the cluster mode, only) Delete the IBM Cloud Pak foundational services operator in the
ibm-common-servicesnamespace.Delete the subscription:
oc delete subscription ibm-common-service-operator -n ibm-common-servicesDelete the CSV.
oc delete csv -l operators.coreos.com/ibm-common-service-operator.ibm-common-services -n ibm-common-services
(A single namespace on the cluster mode, only) Delete the IBM NamespaceScope operator in the
ibm-common-servicesnamespace.Delete the subscription:
oc delete subscription ibm-namespace-scope-operator -n ibm-common-servicesDelete the CSV.
oc delete csv -l operators.coreos.com/ibm-namespace-scope-operator.ibm-common-services -n ibm-common-services
Validate that the resources and operators in the
ibm-common-servicesnamespace that are no longer needed are removed:If your installation is in "All namespaces on the cluster" mode, the following command should return Keycloak and database pods, only:
oc get pods -n ibm-common-servicesFor example:
% oc get pods -n ibm-common-services NAME READY STATUS RESTARTS AGE cs-cloudpak-realm-r7xlk 0/1 Completed 0 12d cs-keycloak-0 1/1 Running 0 40h keycloak-edb-cluster-1 1/1 Running 0 12d rhbk-operator-5f6d7f59d9-4xkx9 1/1 Running 0 40hIf the command returns resources other than Keycloak and database pods, contact Support.
If your installation is in "A single namespace on the cluster" mode, and you upgraded all installations of Cloud Pak for Integration on this OpenShift cluster, the following command should not return any pods:
oc get pods -n ibm-common-servicesFor example:
% oc get pods -n ibm-common-services No resources found in ibm-common-services namespace.