mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
58 lines
1.6 KiB
Plaintext
58 lines
1.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * virt/install/uninstalling-virt.adoc
|
|
|
|
[id="virt-deleting-virt-cli_{context}"]
|
|
= Deleting {VirtProductName}
|
|
|
|
You can delete {VirtProductName} by using the CLI.
|
|
|
|
.Prerequisites
|
|
|
|
- Install the OpenShift CLI (`oc`).
|
|
|
|
- Access to a {VirtProductName} cluster using an account with
|
|
`cluster-admin` permissions.
|
|
|
|
[NOTE]
|
|
====
|
|
When you delete the subscription of the {VirtProductName} operator in the OLM by using the CLI, the ClusterServiceVersion (CSV) object is not deleted from the cluster. To completely uninstall {VirtProductName}, you must explicitly delete the CSV.
|
|
====
|
|
|
|
.Procedure
|
|
|
|
. Delete the HyperConverged Custom Resource:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc delete HyperConverged kubevirt-hyperconverged -n openshift-cnv
|
|
----
|
|
|
|
. Delete the subscription of the {VirtProductName} operator in the Operator Lifecycle Manager (OLM):
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc delete subscription kubevirt-hyperconverged -n openshift-cnv
|
|
----
|
|
|
|
. Set the ClusterServiceVersion (CSV) name for {VirtProductName} as an environment variable:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ CSV_NAME=$(oc get csv -n openshift-cnv -o=custom-columns=:metadata.name)
|
|
----
|
|
. Delete the CSV from the {VirtProductName} cluster by specifying the CSV name from the previous step:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc delete csv ${CSV_NAME} -n openshift-cnv
|
|
----
|
|
+
|
|
{VirtProductName} is uninstalled when a confirmation message indicates that the CSV was deleted successfully:
|
|
+
|
|
.Example output
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
clusterserviceversion.operators.coreos.com "kubevirt-hyperconverged-operator.v{HCOVersion}" deleted
|
|
----
|