OpsCanary
kubernetesstoragePractitioner

Kubernetes v1.37: Mastering the Unused PVC Condition

5 min read Kubernetes BlogSep 21, 2026Reviewed for accuracy
Share
PractitionerHands-on experience recommended

Managing storage in Kubernetes can be tricky, especially when it comes to ensuring that you're not holding onto unused PersistentVolumeClaims (PVCs). The PersistentVolumeClaimUnusedSinceTime feature gate, now promoted to Beta in Kubernetes v1.37, addresses this issue by adding an Unused condition to each PVC. This condition indicates whether any running pod currently references the PVC, allowing you to make informed decisions about your storage resources.

The PVC protection controller plays a crucial role here. It monitors pods to enforce protection for storage objects in use and now manages the new Unused condition on PVCs. If no non-terminal pods reference a PVC, it will show Unused=True with the reason NoPodsUsingPVC. Conversely, if at least one running or pending pod references the PVC, it will indicate Unused=False with the reason PodUsingPVC. Terminated pods are ignored, while pending pods still count towards the usage status. This mechanism allows for better visibility into your PVCs and helps prevent accidental deletions of resources that are still in use.

In production, leveraging the Unused condition can significantly enhance your resource management strategy. You can easily check the status of your PVCs using commands like kubectl get pvc my-data -o jsonpath='{.status.conditions[*]}' | jq . to see the current conditions. However, be cautious when interpreting these statuses, as the command relies on jq, a command-line JSON processor. Always ensure that you have a clear understanding of your PVC usage to avoid unintentional data loss.

Key takeaways

  • Understand the Unused condition to manage PVCs effectively.
  • Use the PVC protection controller to monitor pod references for PVCs.
  • Leverage kubectl commands to check PVC status and conditions.

Why it matters

This feature helps prevent data loss by clearly indicating when PVCs are no longer in use, allowing for better resource management and cleanup in your Kubernetes clusters.

Code examples

YAML
1apiVersion: v1
2kind: PersistentVolumeClaim
3metadata:
4  name: my-data
5spec:
6  accessModes:
7  - ReadWriteOnce
8  resources:
9    requests:
10      storage: 1Gi
shell
kubectl get pvc my-data -o jsonpath='{.status.conditions[*]}' | jq .
shell
kubectl get pvc my-data -o jsonpath='{.status.conditions[?(@.type=="Unused")].status}'

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
Linux Foundation🔥 SEPTEMBER PROMOSponsor

35% off certifications and e-learning with code SEPT26BTS35, or 40% off bundles and instructor-led training with SEPT26BTS40. New this month: the MCPA (Model Context Protocol Associate) certification.

Claim the discount →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.