Uninstalling OpenShift Virtualization¶
You can uninstall OpenShift Virtualization by using the web console or the command-line interface (CLI) to delete OpenShift Virtualization workloads, the Operator, and its resources.
To uninstall OpenShift Virtualization, perform the following tasks:
- Delete the
HyperConvergedCR. - Delete the OpenShift Virtualization Operator.
- Delete the
openshift-cnvnamespace. - Delete the OpenShift Virtualization custom resource definitions (CRDs).
Prerequisites¶
- Delete all virtual machine instances. You cannot uninstall OpenShift Virtualization while its workloads remain on the cluster.
Deleting the HyperConverged custom resource¶
To uninstall OpenShift Virtualization, you first delete the HyperConverged custom resource (CR).
Prerequisites
- You have access to an OpenShift Container Platform cluster using an account with
cluster-adminpermissions.
Procedure
- Navigate to the Ecosystem → Installed Operators page.
- Select the OpenShift Virtualization Operator.
- Click the OpenShift Virtualization Deployment tab.
- Click the Options menu
beside kubevirt-hyperconvergedand select Delete HyperConverged. - Click Delete in the confirmation window.
Deleting Operators from a cluster using the web console¶
Cluster administrators can delete installed Operators from a selected namespace by using the web console.
Prerequisites
- You have access to the OpenShift Container Platform cluster web console using an account with
cluster-adminpermissions.
Procedure
-
Navigate to the Ecosystem → Installed Operators page.
-
Scroll or enter a keyword into the Filter by name field to find the Operator that you want to remove. Then, click on it.
-
On the right side of the Operator Details page, select Uninstall Operator from the Actions list.
An Uninstall Operator? dialog box is displayed.
-
Select Uninstall to remove the Operator, Operator deployments, and pods. Following this action, the Operator stops running and no longer receives updates.
Note
This action does not remove resources managed by the Operator, including custom resource definitions (CRDs) and custom resources (CRs). Dashboards and navigation items enabled by the web console and off-cluster resources that continue to run might need manual clean up. To remove these after uninstalling the Operator, you might need to manually delete the Operator CRDs.
Deleting a namespace using the web console¶
You can delete a namespace by using the OpenShift Container Platform web console.
Prerequisites
- You have access to the OpenShift Container Platform cluster using an account with
cluster-adminpermissions.
Procedure
- Navigate to Administration → Namespaces.
- Locate the namespace that you want to delete in the list of namespaces.
- On the far right side of the namespace listing, select Delete Namespace from the Options menu
. - When the Delete Namespace pane opens, enter the name of the namespace that you want to delete in the field.
- Click Delete.
Deleting OpenShift Virtualization custom resource definitions¶
You can delete the OpenShift Virtualization custom resource definitions (CRDs) by using the web console.
Prerequisites
- You have access to the OpenShift Container Platform cluster using an account with
cluster-adminpermissions.
Procedure
- Navigate to Administration → CustomResourceDefinitions.
- Select the Label filter and enter
operators.coreos.com/kubevirt-hyperconverged.openshift-cnvin the Search field to display the OpenShift Virtualization CRDs. - Click the Options menu
beside each CRD and select Delete CustomResourceDefinition.
Uninstalling OpenShift Virtualization by using the CLI¶
You can uninstall OpenShift Virtualization by using the OpenShift CLI (oc).
Prerequisites
- You have access to the OpenShift Container Platform cluster using an account with
cluster-adminpermissions. - You have installed the OpenShift CLI (
oc). - You have deleted all virtual machines and virtual machine instances. You cannot uninstall OpenShift Virtualization while its workloads remain on the cluster.
Procedure
-
Delete the
HyperConvergedcustom resource: -
Delete the OpenShift Virtualization Operator subscription:
-
Delete the OpenShift Virtualization
ClusterServiceVersionresource: -
Delete the OpenShift Virtualization namespace:
-
List the OpenShift Virtualization custom resource definitions (CRDs) by running the
oc delete crdcommand with thedry-runoption:Example output:
customresourcedefinition.apiextensions.k8s.io "cdis.cdi.kubevirt.io" deleted (dry run) customresourcedefinition.apiextensions.k8s.io "hostpathprovisioners.hostpathprovisioner.kubevirt.io" deleted (dry run) customresourcedefinition.apiextensions.k8s.io "hyperconvergeds.hco.kubevirt.io" deleted (dry run) customresourcedefinition.apiextensions.k8s.io "kubevirts.kubevirt.io" deleted (dry run) customresourcedefinition.apiextensions.k8s.io "networkaddonsconfigs.networkaddonsoperator.network.kubevirt.io" deleted (dry run) customresourcedefinition.apiextensions.k8s.io "ssps.ssp.kubevirt.io" deleted (dry run) customresourcedefinition.apiextensions.k8s.io "tektontasks.tektontasks.kubevirt.io" deleted (dry run) -
Delete the CRDs by running the
oc delete crdcommand without thedry-runoption:
Additional resources
- Deleting the
HyperConvergedcustom resource - Deleting Operators from a cluster using the web console
- Deleting a namespace using the web console
- Deleting OpenShift Virtualization custom resource definitions
- Deleting a virtual machine using the web console
- Deleting a standalone virtual machine instance using the CLI