Uninstall Portworx from a Kubernetes cluster using the DaemonSet
If you installed Portworx using the DaemonSet method, you can follow the steps in this article to uninstall it from your cluster. When uninstalling, you have 2 choices:
- Stop Portworx and remove the Kubernetes specs and completely wipe the data. If this is what you want, continue to Delete/Wipe Portworx.
- Stop Portworx and remove the Kubernetes specs without wiping the data. If this is what you want, continue to Uninstall.
Delete/Wipe Portworx cluster configuration
You can use the following command to wipe your entire Portworx cluster:
curl -fsL "https://install.portworx.com/px-wipe" | bash
Above command will run a Kubernetes Job that will perform following operations:
- Detect the key value store that was being used for Portworx from the DaemonSet spec and wipe the Portworx cluster metadata from it.
- Remove Portworx systemd files from all nodes.
- Removes directories
/etc/pwx
and/opt/pwx
from all nodes. - Removes Portworx fingerprint data from all the storage devices used by Portworx. It also removes all the volume data from the storage devices.
- Delete all Portworx Kubernetes spec objects.
Before running the above wipe job, ensure that the Portworx spec is applied on your cluster.
-c myUpdatedClusterID
).
Uninstall
You can uninstall Portworx from the cluster using the following steps:
Remove the Portworx systemd service and terminate pods by labelling nodes as below. On each node, Portworx monitors this label and will start removing itself when the label is applied.
kubectl label nodes --all px/enabled=remove --overwrite
Monitor the Portworx pods until all of them are terminated
kubectl get pods -o wide -n kube-system -l name=portworx
Remove all Portworx Kubernetes Objects
VER=$(kubectl version --short | awk -Fv '/Server Version: /{print $3}') kubectl delete -f "https://install.portworx.com?ctl=true&kbver=$VER"
Remove the ‘px/enabled’ label from your nodes
kubectl label nodes --all px/enabled-
/etc/pwx/
directory are preserved, and will not be deleted.