Removing leftover resources from container-native virtualization 2.1 uninstallation

Updated

Uninstalling container-native virtualization 2.1 does not remove all container-native virtualization resources from the cluster. These resources prevent the openshift-cnv namespace from being deleted and prevents re-installation of container-native virtualization. This content is not included.BZ#1757705, This content is not included.BZ#1712429

The workaround is to manually delete these resources and the openshift-cnv namespace.

Procedure

  1. The hco-operator Cluster Service Version (CSV) remains in one or more namespaces. Use the following command to find and delete these CSVs:

    1. List the namespaces that have the kubevirt-hyperconverged-operator CSV:

       $ oc get csv --all-namespaces | grep kubevirt-hyperconverged-operator
      
    2. Delete each CSV from the namespaces listed in the previous step. Run this command for each of the namespaces:

       $ oc delete csv kubevirt-hyperconverged-operator -n <namespace>
      
  2. Delete the following resources:

     $ oc delete service kubemacpool-service -n openshift-cnv
     $ oc delete og hco-catalogsource -n openshift-marketplace
     $ oc delete apiservices v1alpha3.subresources.kubevirt.io -n openshift-cnv
    
  3. Delete the openshift-cnv namespace:

     $ oc delete ns openshift-cnv
    
Article Type