What are PersistentVolumes and PersistentVolumeClaims in Kubernetes and who creates each?
PersistentVolumes are storage resources created by an administrator and PersistentVolumeClaims are requests for storage created by users who want to use that storage.
How does Kubernetes bind a PersistentVolumeClaim to a PersistentVolume?
Kubernetes matches a claim to a volume based on requirements like requested capacity access modes volume mode and storage class and then binds one claim to one volume.
What does one to one binding mean for PVCs and PVs and what happens to unused space?
Each PVC binds to exactly one PV and other claims cannot use any remaining capacity left in that PV after binding.
What happens if no suitable PersistentVolume exists when a PVC is created?
The PVC stays in Pending state until a matching PV becomes available and then it can bind automatically when one appears.
How can you force a claim to bind to a specific volume if multiple volumes could match?
You can use labels and selectors on the claim and volumes to target a specific PV during binding.
In the lecture example how do you define a basic PVC and what does it request?
You define apiVersion v1 kind PersistentVolumeClaim name my claim set accessModes to ReadWriteOnce and request 500MB of storage in resources requests.
Which commands are used to create and view a PVC in Kubernetes?
You create it with kubectl create dash f and view it with kubectl get pvc.
Why can a 500MB PVC bind to a 1Gi PV in the example?
A smaller claim can bind to a larger volume if the access mode and other criteria match and there is no better sized volume available.
What kubectl command is used to delete a PersistentVolumeClaim?
kubectl delete pvc followed by the claim name.
What determines what happens to a PersistentVolume when its claim is deleted?
The PersistentVolume reclaimPolicy controls whether the PV is retained deleted or recycled after the PVC is removed.
What does the Retain reclaim policy do when the PVC is deleted?
Retain keeps the PV and its data and the PV is not made available for reuse until an administrator manually handles it.
What does the Delete reclaim policy do when the PVC is deleted?
Delete causes the underlying PV and its storage to be removed automatically when the PVC is deleted.
What does the Recycle reclaim policy attempt to do and why is it deprecated?
Recycle tries to scrub data and make the PV reusable by running a recycler pod that deletes files but it is deprecated because it is not secure not portable and does not handle real provider cleanup needs.
What modern approach replaces Recycle for safe and scalable storage lifecycle management?
The modern approach is dynamic provisioning using StorageClasses and CSI drivers which handle provisioning and cleanup more reliably.