Kubernetes v1.37 promotes the PersistentVolumeClaimUnusedSinceTime feature gate to Beta (enabled by default). With this feature, the PersistentVolumeClaim (PVC) protection controller adds an Unused condition to each PVC, telling you whether any running pod currently references it — no custom tooling or cross-referencing required.
For the API definition of PVC conditions, see the PersistentVolumeClaim API reference. Read on to learn how the Unused condition works and how to use it.
Recent findings suggest that in large-scale Kubernetes clusters, it is common for users to create PVCs and then delete the associated pods without cleaning up the storage, because Kubernetes does not automatically delete PVCs when their pods are removed (to protect against accidental data loss). Over time, these orphaned PVCs may accumulate, silently consuming storage capacity and driving up cloud costs.
Industry observers note that before Kubernetes v1.37, it was easy to identify an unused PersistentVolume, but much harder to determine whether a PVC was still being used. Doing so required cross-referencing pods, PersistentVolumes, and PVCs over a potentially large window of time. Administrators often resorted to custom monitoring pipelines or scripts to answer a seemingly simple question: "Is anything actually using this volume?".
The PersistentVolumeClaimUnusedSinceTime feature solves this by making the answer available natively in the PVC status. Once the feature is enabled, every PVC gets an Unused condition managed by the PVC protection controller.
The PVC protection controller — which already watches pods to enforce the storage object in use protection — now also manages a fresh Unused condition on PVCs.
The condition works as follows:.
Like every Kubernetes condition, the Unused condition carries a standard lastTransitionTime field. This means you get a useful bonus for free: when the condition transitions from False to True, the lastTransitionTime records exactly when the PVC became idle. You can use this timestamp to answer questions like "how long has this PVC been sitting unused?" — for example, to find PVCs that have been idle for more than 30 days (see the example query below).
Kubernetes v1.36 introduced this feature as Alpha, where you had to enable the PersistentVolumeClaimUnusedSinceTime feature gate explicitly. For Beta in v1.37, the feature gate is enabled by default, and the feature has full end-to-end test coverage.
Since the feature is Beta and enabled by default in Kubernetes v1.37, the Unused condition will appear on PVCs automatically. Here is a walkthrough to see it in action:.
After a short time, inspect the PVC conditions:.
You should see an Unused condition with status True and reason NoPodsUsingPVC:.
Create a pod that uses the PVC:.
Check the condition again — it should now show Unused=False:.
Delete the pod and wait for the condition to transition back to Unused=True:.
The condition should show Unused=True with reason NoPodsUsingPVC again.
To list all PVCs that have been unused for more than 30 days, you can use a command like:.
It has been revealed that depending on feedback and adoption, the Kubernetes project intends to graduate this feature to General Availability (GA) in a future release. If you have feedback on this feature, please open an problem in the kubernetes/kubernetes repository.
To learn more about this enhancement, refer to KEP-5541: PersistentVolumeClaim last used time.
The Kubernetes project always welcomes newly introduced contributors. If you would like to get involved, you can join us at SIG Storage.
If you would like to share feedback, you can do so on our public Slack channel (visit https://slack.k8s.io/ for an invitation if you need one).
Special thanks to the contributors who helped design and implement this feature (alphabetical order):.