Skip to content

Commit 98b9cc8

Browse files
committed
CNV-22036: Update CLI, UI uninstall procedures
Signed-off-by: Avital Pinnick <[email protected]>
1 parent 7fc8828 commit 98b9cc8

10 files changed

+100
-139
lines changed

_topic_maps/_topic_map.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,17 +3294,11 @@ Topics:
32943294
Distros: openshift-origin
32953295
- Name: Enabling the virtctl client
32963296
File: virt-enabling-virtctl
3297-
- Name: Uninstalling OpenShift Virtualization using the web console
3298-
File: uninstalling-virt-web
3297+
- Name: Uninstalling OpenShift Virtualization
3298+
File: uninstalling-virt
32993299
Distros: openshift-enterprise
3300-
- Name: Uninstalling OKD Virtualization using the web console
3301-
File: uninstalling-virt-web
3302-
Distros: openshift-origin
3303-
- Name: Uninstalling OpenShift Virtualization using the CLI
3304-
File: uninstalling-virt-cli
3305-
Distros: openshift-enterprise
3306-
- Name: Uninstalling OKD Virtualization using the CLI
3307-
File: uninstalling-virt-cli
3300+
- Name: Uninstalling OKD Virtualization
3301+
File: uninstalling-virt
33083302
Distros: openshift-origin
33093303
- Name: Updating OpenShift Virtualization
33103304
File: upgrading-virt

modules/deleting-a-namespace-using-the-web-console.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88

99
You can delete a namespace by using the {product-title} web console.
1010

11-
[NOTE]
12-
====
13-
If you do not have permissions to delete the namespace, the *Delete Namespace*
14-
option is not available.
15-
====
11+
.Prerequisites
12+
13+
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
1614
1715
.Procedure
1816

modules/olm-deleting-operators-from-a-cluster-using-web-console.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// * operators/admin/olm-deleting-operators-from-a-cluster.adoc
44
// * backup_and_restore/application_backup_and_restore/installing/uninstalling-oadp.adoc
55
// * serverless/install/removing-openshift-serverless.adoc
6+
// * virt/install/uninstalling-virt.adoc
67

78
:_content-type: PROCEDURE
89
[id="olm-deleting-operators-from-a-cluster-using-web-console_{context}"]
@@ -12,7 +13,7 @@ Cluster administrators can delete installed Operators from a selected namespace
1213

1314
.Prerequisites
1415

15-
- Access to an {product-title} cluster web console using an account with
16+
- You have access to an {product-title} cluster web console using an account with
1617
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
1718
`cluster-admin` permissions.
1819
endif::[]

modules/virt-deleting-catalog-subscription.adoc

Lines changed: 0 additions & 22 deletions
This file was deleted.

modules/virt-deleting-deployment-custom-resource.adoc

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,24 @@
22
//
33
// * virt/install/uninstalling-virt-web.adoc
44

5-
//This file contains UI elements and/or package names that need to be updated.
6-
75
:_content-type: PROCEDURE
86
[id="virt-deleting-deployment-custom-resource_{context}"]
9-
= Deleting the {VirtProductName} Operator Deployment custom resource
7+
= Deleting the HyperConverged custom resource
108

11-
To uninstall {VirtProductName}, you must first delete the *{VirtProductName} Operator Deployment* custom resource.
9+
To uninstall {VirtProductName}, you first delete the `HyperConverged` custom resource (CR).
1210

1311
.Prerequisites
1412

15-
* Create the *{VirtProductName} Operator Deployment* custom resource.
13+
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
1614
1715
.Procedure
1816

19-
. From the {product-title} web console, select `openshift-cnv` from the *Projects* list.
20-
2117
. Navigate to the *Operators* -> *Installed Operators* page.
2218

23-
. Click *{VirtProductName}*.
24-
25-
. Click the *{VirtProductName} Operator Deployment* tab.
26-
27-
. Click the Options menu {kebab} in the row containing the *kubevirt-hyperconverged* custom resource. In the expanded menu, click *Delete HyperConverged Cluster*.
19+
. Select the {VirtProductName} Operator.
2820

29-
. Click *Delete* in the confirmation window.
21+
. Click the *{VirtProductName} Deployment* tab.
3022

31-
. Navigate to the *Workloads* -> *Pods* page to verify that only the Operator pods are running.
23+
. Click the Options menu {kebab} beside `kubevirt-hyperconverged` and select *Delete HyperConverged*.
3224

33-
. Open a terminal window and clean up the remaining resources by running the following command:
34-
+
35-
[source,terminal]
36-
----
37-
$ oc delete apiservices v1alpha3.subresources.kubevirt.io -n openshift-cnv
38-
----
25+
. Click *Delete* in the confirmation window.

modules/virt-deleting-virt-cli.adoc

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,16 @@
44

55
:_content-type: PROCEDURE
66
[id="virt-deleting-virt-cli_{context}"]
7-
= Deleting {VirtProductName}
7+
= Uninstalling {VirtProductName} by using the CLI
88

9-
You can delete {VirtProductName} by using the CLI.
9+
You can uninstall {VirtProductName} by using the xref:../../cli_reference/openshift_cli/getting-started-cli.adoc#cli-getting-started[command line interface (CLI)].
1010

1111
.Prerequisites
1212

13-
- Install the OpenShift CLI (`oc`).
14-
15-
- Access to a {VirtProductName} cluster using an account with
16-
`cluster-admin` permissions.
17-
18-
[NOTE]
19-
====
20-
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.
21-
====
13+
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
14+
* You have installed the OpenShift CLI (oc).
15+
* You have deleted all xref:../../virt/virtual_machines/virt-delete-vms.adoc#virt-delete-vm-web_virt-delete-vms[virtual machines], xref:../../virt/virtual_machines/virt-manage-vmis.adoc#virt-deleting-vmis-cli_virt-manage-vmis[virtual machine instances],
16+
and xref:../../virt/virtual_machines/virtual_disks/virt-deleting-datavolumes.adoc#virt-deleting-dvs_virt-deleting-datavolumes[data volumes]. You cannot uninstall {VirtProductName} while its workloads remain on the cluster.
2217
2318
.Procedure
2419

@@ -29,30 +24,41 @@ When you delete the subscription of the {VirtProductName} operator in the OLM by
2924
$ oc delete HyperConverged kubevirt-hyperconverged -n openshift-cnv
3025
----
3126

32-
. Delete the subscription of the {VirtProductName} operator in the Operator Lifecycle Manager (OLM):
27+
. Delete the {VirtProductName} Operator subscription:
3328
+
3429
[source,terminal]
3530
----
3631
$ oc delete subscription kubevirt-hyperconverged -n openshift-cnv
3732
----
3833

39-
. Set the cluster service version (CSV) name for {VirtProductName} as an environment variable:
34+
. Delete the {VirtProductName} `ClusterServiceVersion` resource:
4035
+
4136
[source,terminal]
4237
----
43-
$ CSV_NAME=$(oc get csv -n openshift-cnv -o=jsonpath="{.items[0].metadata.name}")
38+
$ oc delete csv -n openshift-cnv -l operators.coreos.com/kubevirt-hyperconverged.openshift-cnv
4439
----
45-
. Delete the CSV from the {VirtProductName} cluster by specifying the CSV name from the previous step:
40+
41+
. List the {VirtProductName} custom resource definitions (CRDs) by running the `oc delete crd` command with the `dry-run` option:
4642
+
4743
[source,terminal]
4844
----
49-
$ oc delete csv ${CSV_NAME} -n openshift-cnv
45+
$ oc delete crd --dry-run=client -l operators.coreos.com/kubevirt-hyperconverged.openshift-cnv
5046
----
5147
+
52-
{VirtProductName} is uninstalled when a confirmation message indicates that the CSV was deleted successfully:
53-
+
5448
.Example output
55-
[source,terminal,subs="attributes+"]
5649
----
57-
clusterserviceversion.operators.coreos.com "kubevirt-hyperconverged-operator.v{HCOVersion}" deleted
50+
customresourcedefinition.apiextensions.k8s.io "cdis.cdi.kubevirt.io" deleted (dry run)
51+
customresourcedefinition.apiextensions.k8s.io "hostpathprovisioners.hostpathprovisioner.kubevirt.io" deleted (dry run)
52+
customresourcedefinition.apiextensions.k8s.io "hyperconvergeds.hco.kubevirt.io" deleted (dry run)
53+
customresourcedefinition.apiextensions.k8s.io "kubevirts.kubevirt.io" deleted (dry run)
54+
customresourcedefinition.apiextensions.k8s.io "networkaddonsconfigs.networkaddonsoperator.network.kubevirt.io" deleted (dry run)
55+
customresourcedefinition.apiextensions.k8s.io "ssps.ssp.kubevirt.io" deleted (dry run)
56+
customresourcedefinition.apiextensions.k8s.io "tektontasks.tektontasks.kubevirt.io" deleted (dry run)
57+
----
58+
59+
. Delete the CRDs by running the `oc delete crd` command without the `dry-run` option:
60+
+
61+
[source,terminal]
5862
----
63+
$ oc delete crd -l operators.coreos.com/kubevirt-hyperconverged.openshift-cnv
64+
----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/install/uninstalling-virt.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-deleting-virt-crds-web_{context}"]
7+
= Deleting {VirtProductName} custom resource definitions
8+
9+
You can delete the {VirtProductName} custom resource definitions (CRDs) by using the web console.
10+
11+
.Prerequisites
12+
13+
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
14+
15+
.Procedure
16+
17+
. Navigate to *Administration* -> *CustomResourceDefinitions*.
18+
19+
. Select the *Label* filter and enter `operators.coreos.com/kubevirt-hyperconverged.openshift-cnv` in the *Search* field to display the {VirtProductName} CRDs.
20+
21+
. Click the Options menu {kebab} beside each CRD and select *Delete CustomResourceDefinition*.

virt/install/uninstalling-virt-cli.adoc

Lines changed: 0 additions & 27 deletions
This file was deleted.

virt/install/uninstalling-virt-web.adoc

Lines changed: 0 additions & 34 deletions
This file was deleted.

virt/install/uninstalling-virt.adoc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
:_content-type: ASSEMBLY
2+
[id="uninstalling-virt"]
3+
include::_attributes/common-attributes.adoc[]
4+
= Uninstalling {VirtProductName}
5+
:context: uninstalling-virt
6+
7+
toc::[]
8+
9+
You uninstall {VirtProductName} by using the web console or the command line interface (CLI) to delete the {VirtProductName} workloads, the Operator, and its resources.
10+
11+
[id='uninstalling-virt-web-console_{context}']
12+
== Uninstalling {VirtProductName} by using the web console
13+
14+
You uninstall {VirtProductName} by using the xref:../../web_console/web-console.adoc#web-console-overview_web-console[web console] to perform the following tasks:
15+
16+
. xref:../../virt/install/uninstalling-virt.html#virt-deleting-deployment-custom-resource_uninstalling-virt[Delete the `HyperConverged` CR].
17+
. xref:../../virt/install/uninstalling-virt.html#olm-deleting-operators-from-a-cluster-using-web-console_uninstalling-virt[Delete the {VirtProductName} Operator].
18+
. xref:../../virt/install/uninstalling-virt.html#deleting-a-namespace-using-the-web-console_uninstalling-virt[Delete the `openshift-cnv` namespace].
19+
. xref:../../virt/install/uninstalling-virt.html#virt-deleting-virt-crds-web_uninstalling-virt[Delete the {VirtProductName} custom resource definitions (CRDs)].
20+
21+
[IMPORTANT]
22+
====
23+
You must first delete all xref:../../virt/virtual_machines/virt-delete-vms.adoc#virt-delete-vm-web_virt-delete-vms[virtual machines], xref:../../virt/virtual_machines/virt-manage-vmis.adoc#virt-deleting-vmis-cli_virt-manage-vmis[virtual machine instances],
24+
and xref:../../virt/virtual_machines/virtual_disks/virt-deleting-datavolumes.adoc#virt-deleting-dvs_virt-deleting-datavolumes[data volumes].
25+
26+
You cannot uninstall {VirtProductName} while its workloads remain on the cluster.
27+
====
28+
29+
include::modules/virt-deleting-deployment-custom-resource.adoc[leveloffset=+2]
30+
31+
include::modules/olm-deleting-operators-from-a-cluster-using-web-console.adoc[leveloffset=+2]
32+
33+
include::modules/deleting-a-namespace-using-the-web-console.adoc[leveloffset=+2]
34+
35+
include::modules/virt-deleting-virt-crds-web.adoc[leveloffset=+2]
36+
37+
include::modules/virt-deleting-virt-cli.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)