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.
Before you begin
To get the required permissions to delete a persistent volume in a shared cluster, ask your Organization IAM Admin to grant you the Namespace Admin role (
namespace-admin) in your project namespace.To get the required permissions to delete a persistent volume in a standard cluster, ask your Organization IAM Admin to grant you the Cluster Developer role (
cluster-developer) in your standard cluster.
Delete a persistent volume
To delete a PVC, complete the following:
List the existing PVCs in your project namespace:
kubectl get pvc -n NAMESPACEReplace
NAMESPACEwith 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.
Delete the PVC:
kubectl delete pvc PVC_NAME -n NAMESPACEReplace 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