8.5.2. Removing the DevWorkspace Operator
To completely uninstall the web terminal, you must also remove the DevWorkspace Operator and custom resources used by the Operator.
The DevWorkspace Operator is a standalone Operator and may be required as a dependency for other Operators installed in the cluster. Follow the steps below only if you are sure that the DevWorkspace Operator is no longer needed.
Prerequisites
- You have access to an OpenShift Container Platform cluster with cluster administrator permissions.
-
You have installed the
ocCLI.
Procedure
Remove the
DevWorkspacecustom resources used by the Operator, along with any related Kubernetes objects:$ oc delete devworkspaces.workspace.devfile.io --all-namespaces --all --wait$ oc delete devworkspaceroutings.controller.devfile.io --all-namespaces --all --wait警告If this step is not complete, finalizers make it difficult to fully uninstall the Operator.
Remove the CRDs used by the Operator:
警告The DevWorkspace Operator provides custom resource definitions (CRDs) that use conversion webhooks. Failing to remove these CRDs can cause issues in the cluster.
$ oc delete customresourcedefinitions.apiextensions.k8s.io devworkspaceroutings.controller.devfile.io$ oc delete customresourcedefinitions.apiextensions.k8s.io devworkspaces.workspace.devfile.io$ oc delete customresourcedefinitions.apiextensions.k8s.io devworkspacetemplates.workspace.devfile.io$ oc delete customresourcedefinitions.apiextensions.k8s.io devworkspaceoperatorconfigs.controller.devfile.ioVerify that all involved custom resource definitions are removed. The following command should not display any output:
$ oc get customresourcedefinitions.apiextensions.k8s.io | grep "devfile.io"Remove the
devworkspace-webhook-serverdeployment, mutating, and validating webhooks:$ oc delete deployment/devworkspace-webhook-server -n openshift-operators$ oc delete mutatingwebhookconfigurations controller.devfile.io$ oc delete validatingwebhookconfigurations controller.devfile.io注意If you remove the
devworkspace-webhook-serverdeployment without removing the mutating and validating webhooks, you can not useoc execcommands to run commands in a container in the cluster. After you remove the webhooks you can use theoc execcommands again.Remove any remaining services, secrets, and config maps. Depending on the installation, some resources included in the following commands may not exist in the cluster.
$ oc delete all --selector app.kubernetes.io/part-of=devworkspace-operator,app.kubernetes.io/name=devworkspace-webhook-server -n openshift-operators$ oc delete serviceaccounts devworkspace-webhook-server -n openshift-operators$ oc delete clusterrole devworkspace-webhook-server$ oc delete clusterrolebinding devworkspace-webhook-serverUninstall the DevWorkspace Operator:
-
In the Administrator perspective of the web console, navigate to Ecosystem
Installed Operators. - Scroll the filter list or type a keyword into the Filter by name box to find the DevWorkspace Operator.
-
Click the Options menu
for the Operator, and then select Uninstall Operator.
- In the Uninstall Operator confirmation dialog box, click Uninstall to remove the Operator, Operator deployments, and pods from the cluster. The Operator stops running and no longer receives updates.
-
In the Administrator perspective of the web console, navigate to Ecosystem