Uninstalling foundational services
You can uninstall services by using the Operand Deployment Lifecycle Manager.
Note: The default ibm-common-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 ibm-common-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, theibm-common-services
namespace. Then, click Operators > Installed Operators > the overflow menu icon > Uninstall Operator. -
Delete the operator APIs from the
ibm-common-services
namespace.-
Switch to the
ibm-common-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.
-
-
Remove the following configmaps, secrets, and namespace.
oc -n kube-system delete secret icp-metering-api-secret oc -n kube-public delete configmap ibmcloud-cluster-info oc -n kube-public delete configmap ibm-common-services-status oc -n kube-public delete secret ibmcloud-cluster-ca-cert oc delete ValidatingWebhookConfiguration cert-manager-webhook ibm-cs-ns-mapping-webhook-configuration --ignore-not-found oc delete MutatingWebhookConfiguration cert-manager-webhook ibm-common-service-webhook-configuration ibm-operandrequest-webhook-configuration namespace-admission-config --ignore-not-found oc delete namespace services oc delete nss --all
Note: After you uninstall services, the Custom resources definitions (CRDs) are not deleted. If needed, you can manually delete the CRDs that you do not want.
-
Get the CRDs.
oc get crd | grep ibm.com
-
Delete the CRDs that you do not want.
oc delete crd <CRD1> <CRD2> ...<CRDn>
Note: After you uninstall services, the
nss-runtime-managed-role-from-<namespace>
Role is not deleted. You must manually delete the role by running the following command.oc get role --no-headers --all-namespaces -o=custom-columns=NAME:.metadata.name,NAMESPACE:.metadata.namespace | grep nss-runtime-managed-role-from | while read role; do role_name=$(echo $role | awk '{print $1}') role_namespace=$(echo $role | awk '{print $2}') oc -n ${role_namespace} delete role ${role_name} done
-
-
Delete the
ibm-common-services
namespace.-
Click Home > Projects, and find the
ibm-common-services
project. -
Click the overflow menu icon and click Delete Project.
-
-
Verify that the uninstallation is successful.
oc get namespace ibm-common-services
If the command returns an error message that the namespace is not found, it means that the uninstallation is complete. See the following example message:
Error from server (NotFound): namespaces "ibm-common-services" not found
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
ibm-common-services
namespace by selectingibm-common-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: ibm-common-services 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: ibm-common-services spec: requests: - operands: - name: etcd registry: common-service
-
Click Save. The service is uninstalled from your cluster.