This is a cache of https://docs.okd.io/latest/virt/install/uninstalling-virt.html. It is a snapshot of the page at 2024-11-26T19:56:30.106+0000.
Uninstalling OKD Virtualization - Installing | Virtualization | OKD 4
×

Uninstalling OKD Virtualization by using the web console

You uninstall OKD Virtualization by using the web console to perform the following tasks:

You must first delete all virtual machines, and virtual machine instances.

You cannot uninstall OKD Virtualization while its workloads remain on the cluster.

Deleting the HyperConverged custom resource

To uninstall OKD Virtualization, you first delete the HyperConverged custom resource (CR).

Prerequisites
  • You have access to an OKD cluster using an account with cluster-admin permissions.

Procedure
  1. Navigate to the OperatorsInstalled Operators page.

  2. Select the OKD Virtualization Operator.

  3. click the OKD Virtualization Deployment tab.

  4. click the Options menu kebab beside kubevirt-hyperconverged and select Delete HyperConverged.

  5. 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 an OKD cluster web console using an account with cluster-admin permissions.

Procedure
  1. Navigate to the OperatorsInstalled Operators page.

  2. Scroll or enter a keyword into the Filter by name field to find the Operator that you want to remove. Then, click on it.

  3. On the right side of the Operator Details page, select Uninstall Operator from the Actions list.

    An Uninstall Operator? dialog box is displayed.

  4. Select Uninstall to remove the Operator, Operator deployments, and pods. Following this action, the Operator stops running and no longer receives updates.

    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 OKD web console.

Prerequisites
  • You have access to an OKD cluster using an account with cluster-admin permissions.

Procedure
  1. Navigate to AdministrationNamespaces.

  2. Locate the namespace that you want to delete in the list of namespaces.

  3. On the far right side of the namespace listing, select Delete Namespace from the Options menu kebab.

  4. When the Delete Namespace pane opens, enter the name of the namespace that you want to delete in the field.

  5. click Delete.

Deleting OKD Virtualization custom resource definitions

You can delete the OKD Virtualization custom resource definitions (CRDs) by using the web console.

Prerequisites
  • You have access to an OKD cluster using an account with cluster-admin permissions.

Procedure
  1. Navigate to AdministrationCustomResourceDefinitions.

  2. Select the Label filter and enter operators.coreos.com/kubevirt-hyperconverged.openshift-cnv in the Search field to display the OKD Virtualization CRDs.

  3. click the Options menu kebab beside each CRD and select Delete CustomResourceDefinition.

Uninstalling OKD Virtualization by using the cli

You can uninstall OKD Virtualization by using the OpenShift cli (oc).

Prerequisites
  • You have access to an OKD cluster using an account with cluster-admin permissions.

  • You have installed the OpenShift cli (oc).

  • You have deleted all virtual machines and virtual machine instances. You cannot uninstall OKD Virtualization while its workloads remain on the cluster.

Procedure
  1. Delete the HyperConverged custom resource:

    $ oc delete HyperConverged kubevirt-hyperconverged -n kubevirt-hyperconverged
  2. Delete the OKD Virtualization Operator subscription:

    $ oc delete subscription kubevirt-hyperconverged -n kubevirt-hyperconverged
  3. Delete the OKD Virtualization ClusterServiceVersion resource:

    $ oc delete csv -n openshift-cnv -l operators.coreos.com/kubevirt-hyperconverged.kubevirt-hyperconverged
  4. Delete the OKD Virtualization namespace:

    $ oc delete namespace openshift-cnv
  5. List the OKD Virtualization custom resource definitions (CRDs) by running the oc delete crd command with the dry-run option:

    $ oc delete crd --dry-run=client -l operators.coreos.com/kubevirt-hyperconverged.kubevirt-hyperconverged
    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)
  6. Delete the CRDs by running the oc delete crd command without the dry-run option:

    $ oc delete crd -l operators.coreos.com/kubevirt-hyperconverged.kubevirt-hyperconverged