Skip to main content
Version: 3.2

Uninstall Portworx from AKS cluster using the Operator

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 systemctl service, /etc/pwx and /opt/pwx directories, 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

  1. Display the Portworx StorageCluster:

    Use the kubectl get command to display the name of your Portworx storage cluster:

    kubectl get -n <px-namespace> storagecluster <storagecluster-name>
  2. Edit the StorageCluster:

    Modify your storage cluster to initiate the uninstall process:

    kubectl edit -n <px-namespace> storagecluster <storagecluster-name>

    Update the deleteStrategy field in the StorageCluster object:

    • For Uninstall Only:

      apiVersion: core.libopenstorage.org/v1
      kind: StorageCluster
      metadata:
      name: portworx
      namespace: <px-namespace>
      spec:
      deleteStrategy:
      type: Uninstall
    • For Uninstall and Wipe:

      apiVersion: core.libopenstorage.org/v1
      kind: StorageCluster
      metadata:
      name: portworx
      namespace: <px-namespace>
      spec:
      deleteStrategy:
      type: UninstallAndWipe
      note

      Wiping operations will permanently remove all data, including Portworx metadata, from your disks.

  3. Delete the StorageCluster:

    Execute the following command, specifying your StorageCluster object:

    kubectl delete StorageCluster <storagecluster-name> -n <px-namespace>

    This operation can take several minutes to complete.

  4. Remove the Portworx Operator:

    Finally, delete the Portworx Operator deployment:

    kubectl delete deployment -n <px-namespace> portworx-operator

Was this page helpful?