[k8s] Finally a volume access mode that makes sense: ReadWriteOncePod
ReadWriteOnce, ReadOnlyMany, ReadWriteMany access modes don't make much sense IMO, new ReadWriteOncePod does
Kubernetes persistent volume has had, until 1.29
version, the following access modes available:
- ReadWriteOnce
- ReadOnlyMany
- ReadWriteMany
They have all a thing in common, they all reference to the worker node unit.
For example, ReadWriteOnce means
the volume can be mounted as read-write by a single node. ReadWriteOnce access mode still can allow multiple pods to access the volume when the pods are running on the same node. For single pod access, please see ReadWriteOncePod.
And since Kubernetes wants to abstract the concept of computation under the hood, they all don't make much sense.
But finally, since v1.29
a new access mode has reached the stability..
ReadWriteOncePod finally allow us to make a more fine-grained configuration which meets more the real world needs.
ReadWriteOncePod
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv0003
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOncePod
nfs:
...