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

  1. Select SettingsDeployment Targets.

  2. 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:

    remove cluster option
  3. In the Remove Deployment Target window, select Show Deployments.

    remove cluster window
    Note
    If 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.
  4. The All Deployments page displays a list of data service(s) that run on the cluster you want to remove.

  5. Delete all deployed data services.

  6. Set your kubeconfig profile to connect to your Kubernetes cluster using the Admin privileges.

  7. 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
  8. Uninstall the PDS helm chart.

    helm uninstall -n pds-system pds
  9. Select SettingsDeployment Targets.

  10. Wait for the cluster status to display as Unhealthy.

  11. 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.

  12. Select Remove in the Remove Deployment Target window that appears.

    Note
    You cannot undo the remove operation.

PDS does not, currently, remove the following resources:

  • Cluster role bindings

  • Cluster roles

  • Storage classes

  • Data volumes

To remove these resources, refer to the Remove stale resources topic.



Last edited: Thursday, Aug 18, 2022