Uninstalling foundational services
You can uninstall services by using the Operand Deployment Lifecycle Manager.
Note: The default <foundational-services>
namespace is used in the commands in the following sections. However, if you installed IBM Cloud Pak foundational services in a custom namespace in your cluster, replace
<foundational-services>
with your custom namespace in the commands.
Uninstalling all services
If you want to delete all the installed services, complete the steps in this section. Complete these steps from your OpenShift cluster console.
-
Uninstall the
IBM Cloud Pak foundational services
operator. Switch to the namespace where you deployed theIBM Cloud Pak foundational services
operator. For example, the<foundational-services>
namespace. Then, click Operators > Installed Operators > the overflow menu icon > Uninstall Operator. -
Delete the operator APIs from the
<foundational-services>
namespace.-
Switch to the
<foundational-services>
namespace. -
Delete the OperandRequest instances.
-
Click Operators > Installed Operators > Operand Deployment Lifecycle Manager > OperandRequest.
-
Delete all the OperandRequest instances that you created. When an OperandRequest instance is deleted, the services that are requested by this OperandRequest instance are deleted unless the service is requested by other OperandRequest instances.
-
Wait for the OperandRequest instances to be deleted.
-
-
Delete the OperandConfig instances.
-
Click Operators > Installed Operators > Operand Deployment Lifecycle Manager > OperandConfig.
-
Delete all the OperandConfig instances.
-
-
Delete the OperandRegistry instances.
-
Click Operators > Installed Operators > Operand Deployment Lifecycle Manager > OperandRegistry.
-
Delete all the OperandRegistry instances.
-
-
Delete the NamespaceScope instances.
-
Click Operators > Installed Operators > IBM NamespaceScope Operator > NamespaceScope.
-
Delete all the NamespaceScope instances.
-
-
-
Uninstall the Operand Deployment Lifecycle Manager operator.
-
Switch to the
openshift-operators
namespace. -
Click Operators > Installed Operators > the overflow menu icon > Uninstall Operator.
-
-
Uninstall the IBM NamespaceScope operator if it exists
-
Delete tenant namespaces
-
If namespace deletion fails or hangs, patch out the finalizers for remaining objects in the namespaces.
-
Determine which resources need to be patched by running:
oc describe namespace <cs namespace>
Under the Conditions field near the bottom of the output, look for the NamespaceContentRemaining Type.
Conditions: Type Status LastTransitionTime Reason Message ---- ------ ------------------ ------ ------- NamespaceFinalizersRemaining True Wed, 25 Jan 2023 12:10:16 -0800 SomeFinalizersRemain Some content in the namespace has finalizers remaining: commonui.operators.ibm.com in 1 resource instances, commonui1.operators.ibm.com in 1 resource instances
-
For each resource listed in NamespaceContentRemaining, run the following two commands:
oc get <resource type> -n <namespace>
For example, resource type
commonwebuis.operators.ibm.com
. Note down the name of the resources.oc patch <resource type> <resource name> -n <cs namespace> --type="json" -p '[{"op": "remove", "path":"/metadata/finalizers"}]'
-
-
-
Delete additional cluster resources
- Delete
common-service-maps
ConfigMap inkube-public
namespace - Delete
ibm-cs-ns-mapping-webhook-configuration
ValidatingWebhookConfiguration - Delete
ibm-common-service-validating-webhook-<operator-namespace>
ValidatingWebhookConfiguration - Delete
ibm-operandrequest-webhook-configuration-<operator-namespace>
MutatingWebhookConfiguration
- Delete
Uninstalling individual services
If you want to delete one or more services, complete these steps:
-
Log in to your OpenShift cluster console.
-
Switch to the
<foundational-services>
namespace by selecting<foundational-services>
from the Project drop-down list. -
Access the OperandRequest API. Click Operators > Installed Operators > Operand Deployment Lifecycle Manager > OperandRequest.
-
Click Edit OperandRequest. Following is a sample content:
apiVersion: operator.ibm.com/v1alpha1 kind: OperandRequest metadata: name: common-service namespace: <your-foundational-services-namespace> spec: requests: - operands: - name: etcd - name: jenkins registry: common-service
-
For the service that you want to uninstall in your cluster, delete it from the
operands
list. For example, if you want to uninstall thejenkins
service, the OperandRequest definition would resemble the following code:apiVersion: operator.ibm.com/v1alpha1 kind: OperandRequest metadata: name: common-service namespace: <your-foundational-services-namespace> spec: requests: - operands: - name: etcd registry: common-service
-
Click Save. The service is uninstalled from your cluster.