ReadWriteOncePod (RWOP) is a Kubernetes volume access mode that permits one pod across the entire cluster to mount a volume for reading and writing. A PersistentVolumeClaim requests this mode when only one pod instance should use the volume at a time. section 10.2.4 section 10.2.1
Use RWOP to establish an exclusive pod-level storage relationship:
- The volume attaches to one node and mounts into one pod, which can both read and write its files. section 10.2.4
- A second pod using the same PersistentVolumeClaim remains Pending because simultaneous use is forbidden. section 10.2.4
- Do not confuse RWOP with ReadWriteOnce: ReadWriteOnce permits multiple pods on the same node, while RWOP permits only one pod cluster-wide. section 10.2.4 section 10.2.1
Requesting exclusive access for a quiz database
A claim can request RWOP with `accessModes: [ReadWriteOncePod]` and `storage: 1Gi`. A quiz pod then mounts the claim into its MongoDB container. After binding, `kubectl get pvc quiz-data` reports access mode `RWOP`; deleting the pod leaves the claim available for reuse in another pod. section 10.2.1 section 10.2.2
$ kubectl get pods NAME READY STATUS RESTARTS AGE quiz 2/2 Running 0 20m quiz2 0/2 Pending 0 12m
Inspect the expected Pending status when a second pod attempts to use the same RWOP claim. section 10.2.4
