This document explains how to delete persistent storage for container workloads
in your Google Distributed Cloud (GDC) air-gapped sovereign universe. It's important to
remove persistent storage that is no longer in use to maintain the health and
performance of your environment. Persistent storage is managed as a
`PersistentVolumeClaim` resource (PVC).

This document is for developers within the application operator group who are
responsible for managing application workloads for their organization. For more
information, see
[Audiences for GDC air-gapped documentation](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/resources/audiences.md.txt).

## Before you begin

To complete the tasks in this document, you must request the necessary
permissions.

### Request IAM roles

You must have specific roles to get the permissions you need to delete a
persistent volume. The roles you require depend on whether you are working
within an organization-scoped shared cluster or project-scoped standard cluster.
For more information, see [Kubernetes cluster
configurations](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/cluster-configs).

#### Shared cluster roles

To create, delete, edit, or view persistent volumes in a shared cluster, ask
your IAM Project Admin to grant you the **Namespace Admin** (`namespace-admin`)
role. This role is bound to your project namespace.

#### Standard cluster roles

To create, delete, edit, or view persistent volumes in a standard cluster, ask
your IAM Project Admin to grant you the **Cluster Developer**
(`cluster-developer`) role. This role is bound to your project namespace.

## Delete a persistent volume

To delete a PVC, complete the following:

1. List the existing PVCs in your project namespace:

   ```bash
   kubectl get pvc -n NAMESPACE
   ```

   Replace `NAMESPACE` with the namespace in your
   Kubernetes cluster. If your PVC is in a shared cluster, use your project namespace.

   Note the PVC that you want to delete.
2. Delete the PVC:

   ```bash
   kubectl delete pvc PVC_NAME -n NAMESPACE
   ```

   Replace the following:
   - `PVC_NAME`: the name of the PVC to delete.

   - `NAMESPACE`: the namespace in your Kubernetes
     cluster. If your PVC is in a shared cluster, use your project namespace.

   The output is similar to the following:

       persistentvolumeclaim "test-pvc" deleted

## What's next

- [Kubernetes cluster overview](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/clusters.md.txt)
- [Delete a standard cluster](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/delete-standard-cluster.md.txt)
- [Delete a shared cluster](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/delete-user-cluster)