1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/lvms-uninstalling-logical-volume-manager-operator-using-openshift-cli.adoc

68 lines
1.8 KiB
Plaintext

// Module included in the following assemblies:
//
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
:_mod-docs-content-type: PROCEDURE
[id="lvms-unstalling-lvms-using-cli_{context}"]
= Uninstalling {lvms} by using the CLI
You can uninstall {lvms} by using the {oc-first}.
.Prerequisites
* You have logged in to `oc` as a user with `cluster-admin` permissions.
* You deleted the persistent volume claims (PVCs), volume snapshots, and volume clones provisioned by {lvms}. You have also deleted the applications that are using these resources.
* You deleted the `LVMCluster` custom resource (CR).
.Procedure
. Get the `currentCSV` value for the {lvms} Operator by running the following command:
+
[source,terminal]
----
$ oc get subscription.operators.coreos.com lvms-operator -n <namespace> -o yaml | grep currentCSV
----
+
.Example output
[source,terminal]
----
currentCSV: lvms-operator.v4.15.3
----
. Delete the subscription by running the following command:
+
[source,terminal]
----
$ oc delete subscription.operators.coreos.com lvms-operator -n <namespace>
----
+
.Example output
[source,terminal]
----
subscription.operators.coreos.com "lvms-operator" deleted
----
. Delete the CSV for the {lvms} Operator in the target namespace by running the following command:
+
[source,terminal]
----
$ oc delete clusterserviceversion <currentCSV> -n <namespace> <1>
----
<1> Replace `<currentCSV>` with the `currentCSV` value for the {lvms} Operator.
+
.Example output
[source,terminal]
----
clusterserviceversion.operators.coreos.com "lvms-operator.v4.15.3" deleted
----
.Verification
* To verify that the {lvms} Operator is uninstalled, run the following command:
+
[source,terminal]
----
$ oc get csv -n <namespace>
----
+
If the {lvms} Operator was successfully uninstalled, it does not appear in the output of this command.