Remove a Kubernetes cluster and wipe all data
Follow the procedure in this topic, if you no longer need any data of data services (including backups) that were deployed on this deployment target. Before removing a cluster, ensure you have a copy of data residing in backup targets associated with the deployment target.
Prerequisites
-
PDS account Admin privileges
-
An existing deployment target
Procedure
-
Select Settings → Deployment Targets.
-
In the Deployment Targets page, select the vertical ellipsis button in the Kubernetes cluster you want to remove, and then select Remove from the options:
-
In the Remove Deployment Target window, select Show Deployments.
noteIf this option is unavailable, then continue to perform Step 6 in this procedure. In this case, no data services are running on the deployment target. However, the deployment target might still contain backups.
The All Deployments page displays a list of data service(s) that run on the cluster you want to remove.
-
Delete all deployed data services.
-
Set your
kubeconfig
profile to connect to your Kubernetes cluster using the Admin privileges. -
Delete all Custom Resource Definitions (CRDs) in backups, deployments of PDS:
-
Delete all PDS backups:
kubectl delete crd $(kubectl api-resources --api-group=backups.pds.io -o name | tr '\n' ' ') --wait
-
Delete all PDS deployments:
kubectl delete crd $(kubectl api-resources --api-group=deployments.pds.io -o name | tr '\n' ' ') --wait
-
-
Uninstall the PDS helm chart.
helm uninstall -n pds-system pds
-
Select Settings → Deployment Targets.
-
Wait for the cluster status to display as Disconnected.
-
In the Deployment Targets page, select the vertical ellipsis button in the Kubernetes cluster you want to remove, and then select Remove from the options.
-
Select Remove in the Remove Deployment Target window that appears.
noteYou cannot undo the remove operation.
Currently, PDS does not remove the following resources:
-
Cluster role bindings
-
Cluster roles
-
Storage classes
-
Data volumes
To remove these resources, refer to the Remove stale resources topic.