Uninstalling the Operator
Uninstall the Operator online includes deleting parameters such as custom resource definitions, subscription, webhook service, which were created during Operator installation.
About this task
Choose from any of the following methods to uninstall the Operator.
Procedure
- Uninstalling the Operator in the Red Hat OpenShift Container Platform web console. The
following steps apply only to installations that used OLM.
- From the context selector in the navigation menu, click Operators > Installed Operators. A page that lists all the installed Operators opens.
- From Project, select the namespace where the Operator is installed.
- Click the three-dot icon next to the Operator that you want to uninstall, and select Uninstall Operator.
- Confirm the uninstallation message to remove the Operator from the cluster.
- Go to
Administration > CustomResourceDefinitions
in the navigation menu.
The list of custom resource definitions is displayed.
- In the search bar, type apps.oms.ibm.com to filter the CRDs created by the Operator.
- Locate and delete the following CRDs that the Operator created during
installation.
CallCenterOMEnvironmentOMServerOrderHubOrderService
- Uninstalling the Operator by using the
occommand-line tool.Follow steps 1 to 3, only to installations that used OLM. Follow steps 1 to 8 for installations that did not use OLM.
- Delete the ClusterService version by running the following command.
oc delete csv <subscription_name>.<channel> -n <namespace> - Delete the subscription by running the following command. Replace
<subscription_name>with the name of your subscription and<namespace>with the namespace where it was created.oc delete sub <subscription_name> -n <namespace> - Delete the Custom Resource Definitions (CRDs).
oc delete crd callcenters.apps.oms.ibm.com \ omenvironments.apps.oms.ibm.com \ omservers.apps.oms.ibm.com \ orderhubs.apps.oms.ibm.com \ orderservices.apps.oms.ibm.com - Continue with steps 5 to 8 only if you installed without OLM.
- Export the namespace where the OMS Operator is installed.
export INSTALL_NAMESPACE="oms" - Remove the service certificate secret.
oc delete secret ibm-oms-controller-manager-service-cert -n $INSTALL_NAMESPACE - Delete the webhook service.
oc delete svc oms-webhook-service -n $INSTALL_NAMESPACE - Remove both the mutating and validating webhook configurations.
oc delete MutatingWebhookConfiguration oms-mutating-webhook-configuration -n $INSTALL_NAMESPACE oc delete ValidatingWebhookConfiguration oms-validating-webhook-configuration -n $INSTALL_NAMESPACE
- Delete the ClusterService version by running the following command.
- Uninstalling with the Operator Utility script
The
op_utilscript ensures a clean removal of all associated resources within the specified namespace.- Familiarize yourself with the information about Operator Utility script. For more information, see Operator Utility overview.
- Download the Operator Utility script from the following repositories.
- Use the following
uninstallcommand to remove the required Operator from the target Kubernetes environment.op_util uninstall <product> [Options]- Use any of the following values for
<product>based on the Operator that you want to uninstall.omsfor IBM Sterling Order Management System Operatorsipfor IBM Sterling Intelligent Promising Operatoroms-gatewayfor IBM OMS Gateway Operator
- Define the options from the following list.
--namespaceNAMESPACE- Specify the Kubernetes namespace where the Operator should be uninstalled. It defaults to the current Kubernetes context namespace.
--force- Specify to force the uninstallation of the Operator, even if dependencies exist. Hence, use this option with caution.
- Refer to the following examples.
- Example 1: Uninstalling IBM Sterling Order Management System Operator from the current
namespace
op_util uninstall oms - Example 2: Uninstalling IBM Sterling Intelligent Promising Operator from a specific
namespace
op_util uninstall sip --namespace custom-namespace
- Example 1: Uninstalling IBM Sterling Order Management System Operator from the current
namespace
- Use any of the following values for