Live
AI‑driven software supply chain demands new verification and threat‑modeling practicesGitHub Copilot Local Sandboxing: Configuration and Operational ImpactWorkstation Package Protection Adds Real‑Time Controls to DevSecOps PipelinesModal’s Sandbox Scaling Redesign: Handling Millions of Concurrent EnvironmentsNative scale‑to‑zero in GKE 1.37 removes KEDA complexity and cuts cold‑start latencyNative PromQL‑Driven Autoscaling in GKE Eliminates Adapter OverheadAutomated Vulnerability Response at WHOOP: Reducing Alert Fatigue with Datadog AI and Workflow AutomationAWS MFA Enforcement Extends to All Root Accounts – Implications for Cloud EngineersAI‑driven software supply chain demands new verification and threat‑modeling practicesGitHub Copilot Local Sandboxing: Configuration and Operational ImpactWorkstation Package Protection Adds Real‑Time Controls to DevSecOps PipelinesModal’s Sandbox Scaling Redesign: Handling Millions of Concurrent EnvironmentsNative scale‑to‑zero in GKE 1.37 removes KEDA complexity and cuts cold‑start latencyNative PromQL‑Driven Autoscaling in GKE Eliminates Adapter OverheadAutomated Vulnerability Response at WHOOP: Reducing Alert Fatigue with Datadog AI and Workflow AutomationAWS MFA Enforcement Extends to All Root Accounts – Implications for Cloud Engineers
Kubernetes

Beta PVC Unused Condition Streamlines Orphan Volume Detection in Kubernetes v1.37

AI SummaryPowered by AI

Kubernetes v1.37 promotes the PVC Unused condition to Beta and enables it by default, adding a native status flag that shows when a claim has no active pod references. This gives engineers a reliable, built‑in way to identify and clean up orphaned storage, reducing cost and potential data exposure.

Kubernetes v1.37 moves the PersistentVolumeClaimUnusedSinceTime feature gate to Beta and enables it by default, causing the PVC protection controller to attach an Unused condition to every PersistentVolumeClaim. This gives operators a built‑in signal for orphaned storage, eliminating the need for ad‑hoc scripts that cross‑reference pods, PVCs, and volumes.

What Changed in v1.37

The feature, introduced as Alpha in v1.36, now runs automatically. Each PVC receives an Unused condition whose status is True when no non‑terminal pod references the claim and False otherwise. The condition also carries a standard lastTransitionTime timestamp, marking the moment the claim became idle.

Why It Matters to Practitioners

  • AI/ML engineers: Data‑intensive workloads often mount PVCs for model training. Knowing when a claim is truly idle helps avoid accidental reuse of stale data and reduces storage spend.
  • Cloud and platform engineers: Capacity planning can now rely on a native metric rather than custom inventory scripts, simplifying quota management across clusters.
  • DevOps and SRE teams: Automated cleanup pipelines can query the Unused condition directly, turning a manual, error‑prone process into a repeatable job.
  • Security engineers: Unused volumes may retain sensitive data. Detecting idle PVCs early limits the window for potential data exposure.

Operational and Architectural Implications

The PVC protection controller already watches pod lifecycles for storage‑in‑use protection; it now also evaluates the Unused condition. Terminated pods (phase Succeeded or Failed) are ignored, so batch jobs that finish will not keep a claim marked as used. Pending or unschedulable pods still count, reflecting the intent to use the volume.

When multiple pods share a claim, the condition flips to True only after the last non‑terminal pod disappears. This behavior aligns with existing storage‑object‑in‑use semantics and avoids premature deletion of shared data.

Practically, the condition can be queried without extra tooling. For example:

kubectl get pvc -A -o jsonpath='{range .items[?(@.status.conditions[?(@.type=="Unused" && @.status=="True")])]}{.metadata.namespace}/{.metadata.name} {.status.conditions[?(@.type=="Unused")].lastTransitionTime}\n{end}'

The output lists namespace/name pairs with the timestamp of idleness, enabling simple age‑based policies (e.g., delete claims idle >30 days).

What to Watch and Evaluate Next

Although the feature is now default, clusters can still disable the gate manually; verify that your deployment does not override the default. Test the condition in a staging environment to confirm that your existing monitoring and alerting pipelines correctly interpret the new status field. Consider extending cleanup jobs to respect lastTransitionTime thresholds, and review any compliance requirements around data retention that might be affected by automated deletions.

Related CloudNinjas coverage: Kubernetes.

What This Means For Practitioners

  • Replace custom cross‑reference scripts with native Unused condition checks.
  • Incorporate the condition into alerting rules to surface orphaned PVCs early.
  • Leverage lastTransitionTime for age‑based retention policies.
  • Validate that your cluster configuration does not unintentionally disable the feature gate.
  • Plan a phased rollout of automated cleanup that respects the new condition semantics.
Originally published atKubernetes Blog