# Delete PersistentVolumes in Kubernetes

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [streaming-full.txt](https://docs.redpanda.com/streaming-full.txt)

---
title: Delete PersistentVolumes in Kubernetes
latest-operator-version: v26.1.4
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "true"
page-eol-date: December 22, 2024
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
docname: kubernetes/storage/k-delete-persistentvolume
page-component-name: streaming
page-version: "23.3"
page-component-version: "23.3"
page-component-title: Streaming
page-relative-src-path: kubernetes/storage/k-delete-persistentvolume.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/v/23.3/modules/manage/pages/kubernetes/storage/k-delete-persistentvolume.adoc
description: Learn how to delete a PersistentVolume (PV) before removing a broker and its data from the cluster or to perform maintenance or upgrades on the PersistentVolume.
page-git-created-date: "2024-01-04"
page-git-modified-date: "2024-02-26"
support-status: past end-of-life
---

<!-- Source: https://docs.redpanda.com/streaming/23.3/manage/kubernetes/storage/k-delete-persistentvolume.md -->

Deleting a PersistentVolume (PV) can be necessary for a variety of reasons, such as removing a broker and its data from the cluster or performing maintenance or upgrades on the PersistentVolume.

## [](#prerequisites)Prerequisites

-   A running Redpanda deployment on a Kubernetes cluster.

-   PersistentVolumes for either the Redpanda data directory or the Tiered Storage cache.


## [](#delete-a-persistentvolume)Delete a PersistentVolume

To delete a PersistentVolume, follow these steps to ensure that your data is moved to other brokers in the cluster.

1.  Identify the PV that you want to delete:

    ```bash
    kubectl get persistentvolume
    ```

2.  [Decommission the broker](https://docs.redpanda.com/streaming/23.3/manage/kubernetes/k-decommission-brokers/) that has a PersistentVolumeClaim (PVC) bound to the PV.

    Decommissioning helps prevent data loss by gracefully moving the broker’s topic partitions and replicas to other brokers in the cluster.

3.  Delete the PVC that is bound to your PV:

    ```bash
    kubectl delete persistentvolumeclaim <pvc-name> --namespace <namespace>
    ```

    > 📝 **NOTE**
    >
    > To prevent accidental loss of data, PersistentVolumesClaims are not deleted when Redpanda brokers are removed from a cluster. When you no longer need PersistentVolumeClaims, you must delete them manually. Check the [reclaim policy](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaim-policy) of your PersistentVolumes before deleting a PersistentVolumeClaim.
    >
    > ```bash
    > kubectl get persistentvolume --namespace <namespace>
    > ```

4.  If the `reclaimPolicy` of your PV is not `Delete`, delete the PV:

    ```bash
    kubectl delete persistentvolume <pv-name>
    ```

5.  Delete the Pod whose PVC was bound to the deleted PV:

    The StatefulSet schedules a new Pod on the same worker node and assigns it a unique node ID.

    If you use PVs for the Redpanda data directory, the Pod will have a new PVC bound to a PV that is set in [`storage.persistentVolume.storageClass`](https://docs.redpanda.com/streaming/23.3/reference/k-redpanda-helm-spec/#storagepersistentvolumestorageclass). See [Use PersistentVolumes](https://docs.redpanda.com/streaming/23.3/manage/kubernetes/storage/k-configure-storage/).

    If you use PVs for the Tiered Storage cache, the Pod will have a new PVC bound to a PV that is set in [`storage.tieredStoragePersistentVolume.storageClass`](https://docs.redpanda.com/streaming/23.3/reference/k-redpanda-helm-spec/#storagetieredstoragepersistentvolumestorageclass). See [Tiered Storage Caching](https://docs.redpanda.com/streaming/23.3/manage/kubernetes/storage/tiered-storage/k-tiered-storage/#caching).

6.  Verify that the new Redpanda broker is running and that it has access to the appropriate PersistentVolume.

    ```bash
    kubectl --namespace <namespace> exec -ti <pod-name> -c <container-name> -- \
      rpk cluster info
    ```


You should see your new broker running with a new node ID.

## [](#suggested-reading)Suggested reading

-   [PersistentVolume documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)

-   [StatefulSet documentation](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/)


## Suggested labs

-   [Redpanda Iceberg Docker Compose Example](https://docs.redpanda.com/labs/docker-compose/iceberg/)
-   [Enable Unified Identity with Azure Entra ID for Redpanda and Redpanda Console](https://docs.redpanda.com/labs/docker-compose/oidc/)
-   [Owl Shop Example Application in Docker](https://docs.redpanda.com/labs/docker-compose/owl-shop/)
-   [Migrate Data with Redpanda Migrator](https://docs.redpanda.com/labs/docker-compose/redpanda-migrator/)
-   [Start a Single Redpanda Broker with Redpanda Console in Docker](https://docs.redpanda.com/labs/docker-compose/single-broker/)
-   [Start a Cluster of Redpanda Brokers with Redpanda Console in Docker](https://docs.redpanda.com/labs/docker-compose/three-brokers/)
-   [Iceberg Streaming on Kubernetes with Redpanda, MinIO, and Spark](https://docs.redpanda.com/labs/kubernetes/iceberg/)

See more

[Search all labs](https://docs.redpanda.com/labs)