Kubernetes Reclaim Policy: Retain, Delete and Orphaned Disks Delete a PersistentVolumeClaim (PVC) and you might lose a database, keep a forgotten cloud disk billing for months, or both in different clusters. The outcome depends on the PV reclaim policy, the StorageClass, the CSI driver, and what the cloud provider's API does next.

This guide is for Kubernetes administrators, DevOps/SREs, ITOps, and FinOps teams. It covers Retain, Delete, Released PVs, orphaned disks, and a safe cleanup runbook.

One distinction up front. A Released PV is a Kubernetes resource state. An orphaned disk is an external storage asset no longer tied to an active workload or a properly tracked Kubernetes resource.

Key Takeaways

  • Retain keeps the PV and data after PVC deletion, but needs manual review before reuse.
  • Delete removes dynamically provisioned storage automatically; verify your CSI driver and cloud behavior first.
  • Orphaned disks survive failed cleanup and require reconciling Kubernetes records against cloud inventory.
  • Pick a policy based on data criticality, recovery needs, and your cleanup capacity.

Kubernetes Storage Objects and the PV Reclaim Lifecycle

PersistentVolumes, PersistentVolumeClaims and StorageClasses

A PersistentVolume (PV) is a cluster-scoped storage resource. A PersistentVolumeClaim (PVC) is a namespaced request for storage. A StorageClass describes how dynamic volumes are provisioned, including the provisioner, parameters, and the reclaim policy that new PVs inherit.

Kubernetes binds one PV to exactly one PVC, and the PV's claimRef records that claim. Pods reference PVCs in their own namespace; they never pick a backend cloud disk directly.

Provisioning, binding, use and release

The lifecycle runs in order:

  1. A PVC is created and a StorageClass triggers dynamic provisioning.
  2. The PV is created and binds to the PVC.
  3. A Pod mounts the PVC.
  4. The PVC is deleted (the kubernetes.io/pvc-protection finalizer delays this while a Pod still uses it).
  5. The PV's reclaim policy decides what happens next.

PV states versus backend disk states

PVs report four phases:

  • Available: not yet bound to a claim
  • Bound: bound to a claim
  • Released: claim deleted, resource not yet reclaimed
  • Failed: automatic reclaim failed

Cloud disks have their own states: attached, detached, deleted, or still present. A Kubernetes phase alone cannot prove the backend disk is gone. A Failed PV, for instance, may sit on top of a disk that still exists and still bills.

Kubernetes PV phases compared with cloud disk lifecycle states

Retain vs. Delete: How Kubernetes Handles Released Storage

Retain policy

With Retain, deleting the PVC leaves the PV in Released. It won't bind to a new claim automatically, because the previous data is still on the volume. Per Kubernetes documentation, an administrator then reclaims it manually: recover or clean the data, and manage the PV and backing storage separately.

Good fits for Retain:

  • Databases and business-critical or regulated data
  • Migration workflows
  • Incident investigation
  • Workloads that need manual approval before deletion

Retain moves the burden to people. Assign an owner, keep a backup, and plan data sanitization before the volume is reused or removed.

Delete policy

With Delete, supported provisioners remove the PV and the backing storage asset once the claim is deleted. Behavior still depends on driver support, finalizers, attachment state, and provider API responses.

Good fits for Delete:

  • Temporary environments and disposable test workloads
  • Caches
  • Data you can regenerate

If anything might be needed later, snapshot it first. Delete is not reversible.

Out-of-order deletes used to leave external volumes behind. Kubernetes v1.33 made CSI deletion protection GA: the external-provisioner.volume.kubernetes.io/finalizer stays on the PV until the provisioner removes the backing volume.

That closes the gap where deleting a PV before its PVC could leak the external volume. It requires external-provisioner v5.0.1 or later.

Recycle and legacy configurations

Recycle ran a basic scrub so a volume could be reused. It is deprecated. Use Retain or Delete, and check older manifests for leftover Recycle settings.

Defaults and inheritance

Dynamically provisioned PVs inherit reclaimPolicy from their StorageClass. The documented default is Delete, but don't assume every cluster matches; a platform team may have set something else. Check the StorageClass and the individual PV before deleting any PVC.

Kubernetes PVC deletion outcomes for Retain and Delete policies

Choosing the right policy

Weigh these factors:

  • Recoverability: can you rebuild the data from source?
  • Criticality: what does losing it cost?
  • Environment: production versus dev and test
  • Compliance: retention or deletion obligations
  • Ownership: who cleans up Retained volumes?
  • Carrying cost: what do unused disks cost per month?

Document the policy per StorageClass instead of trusting an unexamined cluster default.

Orphaned Disks: Causes, Risks and a Safe Cleanup Runbook

What an orphaned disk means in Kubernetes environments

An orphaned disk is a backend block-storage asset that outlives its workload, PV, or PVC, or no longer has a reliable reference to any of them. A deliberately retained disk awaiting recovery is not an orphan; it has an owner and a purpose.

Typical examples:

  • An unattached cloud disk with no matching PV
  • A PV deleted while its backend disk remains
  • A Released PV whose disk still consumes capacity

Why orphaned disks appear

  • Failed CSI or cloud-provider deletion calls
  • Interrupted namespace or cluster teardown
  • Manual deletion of Kubernetes objects
  • Provider API errors
  • Stale finalizers
  • Mismatched StorageClasses or broken ownership metadata

Provider behavior varies:

  • GKE: Google's GKE docs warn that cluster deletion doesn't wait for all storage deletion. Deleting a namespace and then immediately the cluster can leave Delete PVs undeleted.
  • AWS: the EBS CSI driver tags volumes with CSIVolumeName and ebs.csi.aws.com/cluster=true. PVC namespace and name tags need extra provisioner configuration.
  • Azure: the Azure Disk CSI driver tags disks with kubernetes.io-created-for-pv-name, kubernetes.io-created-for-pvc-name, and kubernetes.io-created-for-pvc-namespace.

Individual bug reports exist on both the AWS and Azure drivers. They are historical cases, not evidence of how common leaks are.

Business and security risks

  • Cost: AWS states that unattached EBS volumes keep incurring charges by provisioned size and type. Microsoft says the same of Azure disks left behind after VM deletion.
  • Ownership: nobody knows who owns the data or whether it can go.
  • Incident response: stray volumes muddy the picture.
  • Data exposure: sensitive data can outlive the application's intended lifecycle.

A FinOps Foundation case describes a buggy autoscaling group that abandoned EBS volumes costing thousands of dollars per day. It's one anecdote, not a typical rate.

Detecting orphaned disks

Start inside Kubernetes:

kubectl get pv
kubectl get pvc --all-namespaces
kubectl get storageclass -o yaml
kubectl describe pv <pv-name>

Check events too. Note each PV's spec.csi.volumeHandle, which uniquely identifies the CSI volume. Then list candidates in the cloud:

# AWS
aws ec2 describe-volumes --filters Name=status,Values=available
# Azure
az disk list --query '[?managedBy==`null`].[id]' -o tsv
# Google Cloud (users is null when unattached)
gcloud compute disks list

Compare disk IDs, volume handles, tags, namespaces, owners, creation times, attachment state, and last-known workloads. Names alone prove nothing. available or a null managedBy reports attachment state only; correlate each candidate with a PV handle and reclaim policy before calling it an orphan.

Remediating safely

Classify before you delete:

  1. Identify the owner from tags, handles, and team records.
  2. Decide whether data must be recovered.
  3. Snapshot or verify a backup. Kubernetes offers CSI VolumeSnapshot objects; each cloud has native snapshots too.
  4. Get approval before removing any uncertain disk.
  5. Clean up a confirmed orphan through the normal Kubernetes and provider workflow.
  6. Verify that the Kubernetes object, cloud disk, snapshot, billing record, and ownership inventory all agree.

Six-step Kubernetes orphaned disk cleanup and verification runbook

Don't strip finalizers, delete PVs, or force-delete backend disks until you understand why normal cleanup failed. The failure is often the only clue to what's still attached.

Configure and Change Reclaim Policies Safely

Set the policy through a StorageClass

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: critical-retained
provisioner: <csi-provisioner>   # ebs.csi.aws.com, disk.csi.azure.com, or pd.csi.storage.gke.io
reclaimPolicy: Retain
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: ephemeral
provisioner: <csi-provisioner>
reclaimPolicy: Delete

Use the provisioner documented for your platform. A PVC selects a class with storageClassName: critical-retained. Changing a StorageClass later does not alter PVs already created.

Inspect the current configuration

Before deleting any claim, run:

kubectl get sc
kubectl get sc <class-name> -o yaml
kubectl get pv
kubectl describe pv <pv-name>

Verify persistentVolumeReclaimPolicy, StorageClass, CSI volume handle, phase, claim reference, finalizers, and recent events.

Change an existing PV before deleting its PVC

Edit or patch the PV itself. The official Kubernetes task uses:

kubectl patch pv <your-pv-name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'

Confirm with kubectl get pv. Do this before the PVC is deleted; once Delete has begun, patching may be too late.

Reuse or recover a Retained PV

  1. Inspect the Released PV.
  2. Snapshot or preserve the data.
  3. Get approval, then clear the stale claim reference. Kubernetes docs give no universal command for this, so follow your platform's documented procedure.
  4. Create a compatible PVC and bind it with spec.volumeName.

A reused volume may expose old application data. Before binding, validate:

  • Ownership and access modes
  • Filesystem contents and capacity
  • Sanitization needs for sensitive data

Test deletion and recovery behavior

In a non-production cluster, test both policies end to end:

  • Delete a PVC while a Pod is still active
  • Watch detach timing, CSI events, provider-side disk status, and finalizers
  • Restore from a snapshot to confirm recovery

Three-part Kubernetes storage deletion and recovery testing workflow

Before you use Delete on stateful or business-critical workloads, document backup, alerting, and rollback procedures.

Operational Best Practices for Storage Governance and Cost Control

  • Standardize StorageClasses by intent: critical-retained, recoverable, ephemeral, development.
  • Label PVCs with owner, environment, data classification, and cleanup responsibility. Prefer Kubernetes recommended labels such as app.kubernetes.io/part-of, and use annotations for non-identifying metadata.
  • Monitor Released PVs, unattached disks, failed deletion events, stale finalizers, and disks with no Kubernetes owner. Set a review and escalation path for anything unresolved.

A visibility layer for backend inventory catches waste the cluster view alone misses. Lucidity's Lumen shows every disk across AWS, Azure, and Google Cloud and gives one-click recommendations for idle disks, including unattached, unmounted, reserved, and zero-I/O volumes.

Assessment scans in about 5 minutes with no agents or installation. These tools complement Kubernetes policy, backups, and provider-native cleanup; they don't replace them.

Pre-deletion checklist:

  • Active reclaim policy confirmed on the PV
  • PVC and Pod usage checked
  • Backup or snapshot available
  • Data owner approval recorded
  • Cloud disk identity (volume handle) matched
  • Expected post-deletion state written down

Frequently Asked Questions

What is the reclaim policy in Kubernetes?

It's the PV setting that decides what happens to the volume after its PVC is deleted. Retain keeps the PV and data, Delete removes the PV and backing storage, and Recycle (deprecated) performs a basic scrub.

What is a PersistentVolumeClaim (PVC) in Kubernetes?

A PVC is a namespaced request for storage. Kubernetes binds it to a compatible PV, and a Pod in the same namespace mounts it.

What is the difference between a PersistentVolume and a PersistentVolumeClaim in Kubernetes?

A PV is the cluster-scoped storage resource. A PVC is a workload's request to consume that resource.

What happens to a PV when its PVC is deleted with Retain?

The PV and its data remain, and the PV commonly enters Released. An administrator must inspect it and manually reclaim or reuse it.

How do I change the reclaim policy of an existing PV?

Edit or patch the PV's persistentVolumeReclaimPolicy, ideally before deleting the PVC. Verify with kubectl get pv and confirm backups first.

How can I find and clean up orphaned Kubernetes disks?

Reconcile PV, PVC, and StorageClass records against your cloud provider's disk inventory. Confirm ownership, check for a snapshot, then delete confirmed orphans through a controlled process.