|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="lvms-unstalling-lvms-using-cli_{context}"] |
| 7 | += Uninstalling {lvms} by using the CLI |
| 8 | + |
| 9 | +You can uninstall {lvms} by using the {oc-first}. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You have logged in to `oc` as a user with `cluster-admin` permissions. |
| 14 | +* 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. |
| 15 | +* You deleted the `LVMCluster` custom resource (CR). |
| 16 | +
|
| 17 | +.Procedure |
| 18 | + |
| 19 | +. Get the `currentCSV` value for the {lvms} Operator by running the following command: |
| 20 | ++ |
| 21 | +[source,terminal] |
| 22 | +---- |
| 23 | +$ oc get subscription.operators.coreos.com lvms-operator -n <namespace> -o yaml | grep currentCSV |
| 24 | +---- |
| 25 | ++ |
| 26 | +.Example output |
| 27 | +[source,terminal] |
| 28 | +---- |
| 29 | +currentCSV: lvms-operator.v4.15.3 |
| 30 | +---- |
| 31 | + |
| 32 | +. Delete the subscription by running the following command: |
| 33 | ++ |
| 34 | +[source,terminal] |
| 35 | +---- |
| 36 | +$ oc delete subscription.operators.coreos.com lvms-operator -n <namespace> |
| 37 | +---- |
| 38 | ++ |
| 39 | +.Example output |
| 40 | +[source,terminal] |
| 41 | +---- |
| 42 | +subscription.operators.coreos.com "lvms-operator" deleted |
| 43 | +---- |
| 44 | + |
| 45 | +. Delete the CSV for the {lvms} Operator in the target namespace by running the following command: |
| 46 | ++ |
| 47 | +[source,terminal] |
| 48 | +---- |
| 49 | +$ oc delete clusterserviceversion <currentCSV> -n <namespace> <1> |
| 50 | +---- |
| 51 | +<1> Replace `<currentCSV>` with the `currentCSV` value for the {lvms} Operator. |
| 52 | ++ |
| 53 | +.Example output |
| 54 | +[source,terminal] |
| 55 | +---- |
| 56 | +clusterserviceversion.operators.coreos.com "lvms-operator.v4.15.3" deleted |
| 57 | +---- |
| 58 | + |
| 59 | +.Verification |
| 60 | + |
| 61 | +* To verify that the {lvms} Operator is uninstalled, run the following command: |
| 62 | ++ |
| 63 | +[source,terminal] |
| 64 | +---- |
| 65 | +$ oc get csv -n <namespace> |
| 66 | +---- |
| 67 | ++ |
| 68 | +If the {lvms} Operator was successfully uninstalled, it does not appear in the output of this command. |
0 commit comments