1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

CNV-22036: Update CLI, UI uninstall procedures

Signed-off-by: Avital Pinnick <apinnick@redhat.com>
This commit is contained in:
Avital Pinnick
2022-11-14 18:54:34 +02:00
committed by openshift-cherrypick-robot
parent d8262465f6
commit 13ef311b61
10 changed files with 100 additions and 139 deletions

View File

@@ -3297,17 +3297,11 @@ Topics:
Distros: openshift-origin
- Name: Enabling the virtctl client
File: virt-enabling-virtctl
- Name: Uninstalling OpenShift Virtualization using the web console
File: uninstalling-virt-web
- Name: Uninstalling OpenShift Virtualization
File: uninstalling-virt
Distros: openshift-enterprise
- Name: Uninstalling OKD Virtualization using the web console
File: uninstalling-virt-web
Distros: openshift-origin
- Name: Uninstalling OpenShift Virtualization using the CLI
File: uninstalling-virt-cli
Distros: openshift-enterprise
- Name: Uninstalling OKD Virtualization using the CLI
File: uninstalling-virt-cli
- Name: Uninstalling OKD Virtualization
File: uninstalling-virt
Distros: openshift-origin
- Name: Updating OpenShift Virtualization
File: upgrading-virt

View File

@@ -8,11 +8,9 @@
You can delete a namespace by using the {product-title} web console.
[NOTE]
====
If you do not have permissions to delete the namespace, the *Delete Namespace*
option is not available.
====
.Prerequisites
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
.Procedure

View File

@@ -3,6 +3,7 @@
// * operators/admin/olm-deleting-operators-from-a-cluster.adoc
// * backup_and_restore/application_backup_and_restore/installing/uninstalling-oadp.adoc
// * serverless/install/removing-openshift-serverless.adoc
// * virt/install/uninstalling-virt.adoc
:_content-type: PROCEDURE
[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
.Prerequisites
- Access to an {product-title} cluster web console using an account with
- You have access to an {product-title} cluster web console using an account with
ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
`cluster-admin` permissions.
endif::[]

View File

@@ -1,22 +0,0 @@
// Module included in the following assemblies:
//
// * virt/install/uninstalling-virt.adoc
:_content-type: PROCEDURE
[id="virt-deleting-catalog-subscription_{context}"]
= Deleting the {VirtProductName} catalog subscription
To finish uninstalling {VirtProductName}, delete the
*{VirtProductName}* catalog subscription.
.Prerequisites
* An active subscription to the *{VirtProductName}* catalog
.Procedure
. Navigate to the *Operators* -> *OperatorHub* page.
. Search for *{VirtProductName}* and then select it.
. Click *Uninstall*.

View File

@@ -2,37 +2,24 @@
//
// * virt/install/uninstalling-virt-web.adoc
//This file contains UI elements and/or package names that need to be updated.
:_content-type: PROCEDURE
[id="virt-deleting-deployment-custom-resource_{context}"]
= Deleting the {VirtProductName} Operator Deployment custom resource
= Deleting the HyperConverged custom resource
To uninstall {VirtProductName}, you must first delete the *{VirtProductName} Operator Deployment* custom resource.
To uninstall {VirtProductName}, you first delete the `HyperConverged` custom resource (CR).
.Prerequisites
* Create the *{VirtProductName} Operator Deployment* custom resource.
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
.Procedure
. From the {product-title} web console, select `openshift-cnv` from the *Projects* list.
. Navigate to the *Operators* -> *Installed Operators* page.
. Click *{VirtProductName}*.
. Select the {VirtProductName} Operator.
. Click the *{VirtProductName} Operator Deployment* tab.
. Click the *{VirtProductName} Deployment* tab.
. Click the Options menu {kebab} in the row containing the *kubevirt-hyperconverged* custom resource. In the expanded menu, click *Delete HyperConverged Cluster*.
. Click the Options menu {kebab} beside `kubevirt-hyperconverged` and select *Delete HyperConverged*.
. Click *Delete* in the confirmation window.
. Navigate to the *Workloads* -> *Pods* page to verify that only the Operator pods are running.
. Open a terminal window and clean up the remaining resources by running the following command:
+
[source,terminal]
----
$ oc delete apiservices v1alpha3.subresources.kubevirt.io -n openshift-cnv
----
. Click *Delete* in the confirmation window.

View File

@@ -4,21 +4,16 @@
:_content-type: PROCEDURE
[id="virt-deleting-virt-cli_{context}"]
= Deleting {VirtProductName}
= Uninstalling {VirtProductName} by using the CLI
You can delete {VirtProductName} by using the CLI.
You can uninstall {VirtProductName} by using the xref:../../cli_reference/openshift_cli/getting-started-cli.adoc#cli-getting-started[command line interface (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.
====
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
* You have installed the OpenShift CLI (oc).
* 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],
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.
.Procedure
@@ -29,30 +24,41 @@ When you delete the subscription of the {VirtProductName} operator in the OLM by
$ oc delete HyperConverged kubevirt-hyperconverged -n openshift-cnv
----
. Delete the subscription of the {VirtProductName} operator in the Operator Lifecycle Manager (OLM):
. Delete the {VirtProductName} Operator subscription:
+
[source,terminal]
----
$ oc delete subscription kubevirt-hyperconverged -n openshift-cnv
----
. Set the cluster service version (CSV) name for {VirtProductName} as an environment variable:
. Delete the {VirtProductName} `ClusterServiceVersion` resource:
+
[source,terminal]
----
$ CSV_NAME=$(oc get csv -n openshift-cnv -o=jsonpath="{.items[0].metadata.name}")
$ oc delete csv -n openshift-cnv -l operators.coreos.com/kubevirt-hyperconverged.openshift-cnv
----
. Delete the CSV from the {VirtProductName} cluster by specifying the CSV name from the previous step:
. List the {VirtProductName} custom resource definitions (CRDs) by running the `oc delete crd` command with the `dry-run` option:
+
[source,terminal]
----
$ oc delete csv ${CSV_NAME} -n openshift-cnv
$ oc delete crd --dry-run=client -l operators.coreos.com/kubevirt-hyperconverged.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
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 crd` command without the `dry-run` option:
+
[source,terminal]
----
$ oc delete crd -l operators.coreos.com/kubevirt-hyperconverged.openshift-cnv
----

View File

@@ -0,0 +1,21 @@
// Module included in the following assemblies:
//
// * virt/install/uninstalling-virt.adoc
:_content-type: PROCEDURE
[id="virt-deleting-virt-crds-web_{context}"]
= Deleting {VirtProductName} custom resource definitions
You can delete the {VirtProductName} custom resource definitions (CRDs) by using the web console.
.Prerequisites
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
.Procedure
. Navigate to *Administration* -> *CustomResourceDefinitions*.
. Select the *Label* filter and enter `operators.coreos.com/kubevirt-hyperconverged.openshift-cnv` in the *Search* field to display the {VirtProductName} CRDs.
. Click the Options menu {kebab} beside each CRD and select *Delete CustomResourceDefinition*.

View File

@@ -1,27 +0,0 @@
:_content-type: ASSEMBLY
[id="uninstalling-virt-cli"]
include::_attributes/common-attributes.adoc[]
= Uninstalling {VirtProductName} using the CLI
:context: uninstalling-virt-cli
toc::[]
You can uninstall {VirtProductName} by using the {product-title}
xref:../../cli_reference/openshift_cli/getting-started-cli.adoc#cli-getting-started[CLI].
[id="uninstalling-virt-cli-prereqs"]
== Prerequisites
* You must have {VirtProductName} {VirtVersion} installed.
* You must 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],
and xref:../../virt/virtual_machines/virtual_disks/virt-deleting-datavolumes.adoc#virt-deleting-dvs_virt-deleting-datavolumes[data volumes].
+
[IMPORTANT]
====
Attempting to uninstall {VirtProductName} without deleting these objects
results in failure.
====
include::modules/virt-deleting-virt-cli.adoc[leveloffset=+1]

View File

@@ -1,34 +0,0 @@
:_content-type: ASSEMBLY
[id="uninstalling-virt-web"]
include::_attributes/common-attributes.adoc[]
= Uninstalling {VirtProductName} using the web console
:context: uninstalling-virt-web
toc::[]
You can uninstall {VirtProductName} by using the {product-title}
xref:../../web_console/web-console.adoc#web-console-overview_web-console[web console].
== Prerequisites
* You must have {VirtProductName} {VirtVersion} installed.
* You must 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],
and xref:../../virt/virtual_machines/virtual_disks/virt-deleting-datavolumes.adoc#virt-deleting-dvs_virt-deleting-datavolumes[data volumes].
+
[IMPORTANT]
====
Attempting to uninstall {VirtProductName} without deleting these objects
results in failure.
====
include::modules/virt-deleting-deployment-custom-resource.adoc[leveloffset=+1]
include::modules/virt-deleting-catalog-subscription.adoc[leveloffset=+1]
[NOTE]
====
You can now delete the `openshift-cnv` namespace.
====
include::modules/deleting-a-namespace-using-the-web-console.adoc[leveloffset=+1]

View File

@@ -0,0 +1,37 @@
:_content-type: ASSEMBLY
[id="uninstalling-virt"]
include::_attributes/common-attributes.adoc[]
= Uninstalling {VirtProductName}
:context: uninstalling-virt
toc::[]
You uninstall {VirtProductName} by using the web console or the command line interface (CLI) to delete the {VirtProductName} workloads, the Operator, and its resources.
[id='uninstalling-virt-web-console_{context}']
== Uninstalling {VirtProductName} by using the web console
You uninstall {VirtProductName} by using the xref:../../web_console/web-console.adoc#web-console-overview_web-console[web console] to perform the following tasks:
. xref:../../virt/install/uninstalling-virt.html#virt-deleting-deployment-custom-resource_uninstalling-virt[Delete the `HyperConverged` CR].
. xref:../../virt/install/uninstalling-virt.html#olm-deleting-operators-from-a-cluster-using-web-console_uninstalling-virt[Delete the {VirtProductName} Operator].
. xref:../../virt/install/uninstalling-virt.html#deleting-a-namespace-using-the-web-console_uninstalling-virt[Delete the `openshift-cnv` namespace].
. xref:../../virt/install/uninstalling-virt.html#virt-deleting-virt-crds-web_uninstalling-virt[Delete the {VirtProductName} custom resource definitions (CRDs)].
[IMPORTANT]
====
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],
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.
====
include::modules/virt-deleting-deployment-custom-resource.adoc[leveloffset=+2]
include::modules/olm-deleting-operators-from-a-cluster-using-web-console.adoc[leveloffset=+2]
include::modules/deleting-a-namespace-using-the-web-console.adoc[leveloffset=+2]
include::modules/virt-deleting-virt-crds-web.adoc[leveloffset=+2]
include::modules/virt-deleting-virt-cli.adoc[leveloffset=+1]