Two settings decide who may use a volume and what happens when they stop.
Access modes
| Mode | Short | Means |
|---|---|---|
ReadWriteOnce | RWO | One node mounts it read-write |
ReadOnlyMany | ROX | Many nodes mount it read-only |
ReadWriteMany | RWX | Many nodes mount it read-write |
ReadWriteOncePod | RWOP | One Pod, read-write |
A claim binds only to a volume that offers every mode it asks for. Most block disks are RWO only; RWX needs a shared filesystem such as NFS. A claim asking for RWX on a cluster that cannot provide it stays Pending, and describe pvc says so.
Reclaim policies
What happens to a PV when its claim is deleted:
Delete is the default for dynamically provisioned volumes. Retain is for data you cannot afford to lose by accident.
Released is not Available
learner@shallows:~$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM
ledger-pv 1Gi RWO Retain Released depths/ledgerThe data is on disk. spec.claimRef still names the deleted claim, so no other claim can bind. To reuse the volume, clear the reference:
learner@shallows:~$ kubectl patch pv ledger-pv -p '{"spec":{"claimRef":null}}'
persistentvolume/ledger-pv patchedThe phase returns to Available and the next matching claim binds, data included.