Uninstall Portworx in ROSA
Using the Portworx Operator, you can efficiently uninstall Portworx from your clusters. This can be achieved by updating the StorageCluster object, and you have the option to either keep the data on your drives or wipe them completely.
- Uninstall: will remove the Kubernetes objects, Portworx
systemctlservice,/etc/pwxand/opt/pwxdirectories, and all traces of Portworx on the nodes. The drives will not be formatted and none the Portworx Metadata in the KVDB will be deleted. You may need to Uninstall Portworx if you installed Portworx in the wrong namespace. - Uninstall and wipe: will remove all of the resources listed in the "Uninstall" procedure, and also removes (formats) all data from your disks permanently, including the Portworx metadata. You may want to perform an uninstall and wipe when you decommission a cluster.
Prerequisites
- A successfully deployed Portworx Operator on your cluster.
Uninstall Portworx
-
Enter the
oc getcommand to display the name of your Portworx storage cluster and specify your namespace:oc get -n portworx storagecluster <storagecluster-name> -
Enter the
oc editcommand to modify your storage cluster and specify your namespace:oc edit -n portworx storagecluster <storagecluster-name> -
Modify your
StorageClusterobject, adding thedeleteStrategyfield with either theUninstallorUninstallAndWipetype:-
Uninstall Portworx only:
apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: portworx
namespace: portworx
spec:
deleteStrategy:
type: Uninstall -
Uninstall Portworx and wipe all drives:
noteWipe operations remove all data from your disks permanently including the Portworx metadata, use caution when applying the DeleteStrategy spec.
apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: portworx
namespace: portworx
spec:
deleteStrategy:
type: UninstallAndWipe
-
-
Enter the
oc deletecommand, specifying the name of yourStorageClusterobject and specify your namespace:oc delete StorageCluster <your-storagecluster-name> -n portworxnoteThis operation can take several minutes to complete.
-
Delete the operator:
oc delete deployment -n <px-namespace> portworx-operator