This section describes how to delete a persistent volume.

The default reclamation policy for storage classes on the KubeSphere platform is Delete, meaning that by default, the system automatically deletes the persistent volume after the persistent volume claim is deleted. If you have created a persistent volume or storage class with a reclamation policy of Retain, there may be situations where the persistent volume claim is deleted but the persistent volume is not. For more information, please refer to the Kubernetes official documentation.

Warning

Once a persistent volume is deleted, it cannot be recovered, and the corresponding backend storage area will also be deleted. Please perform this operation with caution to avoid data loss.

Prerequisites

  • You need to join a cluster and have the Persistent Volume Claim Management permission in the cluster. For more information, see Cluster Members and Cluster Roles.

  • The persistent volume status is Available, Released, or Failed.

  • Please back up the data in the backend storage area in advance to avoid data loss.

Steps

  1. Log in to the KubeSphere web console with a user who has Persistent Volume Claim Management permissions and enter your cluster.

  2. Click Storage > Persistent Volume Claims in the left navigation pane.

  3. On the Persistent Volume Claims page, click Persistent Volumes to open the persistent volume list.

  4. To the right of the persistent volume you want to delete, click more, then select Delete from the dropdown list.

  5. In the Delete Persistent Volume dialog box, enter the name of the persistent volume, then click OK.