Reputation: 33
I tried to search and look for resources regarding this, but i found that ReadWriteOnce
mode allows a node to read and write once. A node consists of many pods and that's what i'm confused about because pods can read or write, is this process going to be scheduled ?.
What i'm really trying to achieve is thread safety
!
since there's one master who can write to this shared volume and many nodes should read after.
Upvotes: 0
Views: 53
Reputation: 3962
ReadWriteOnce
is an access mode and access modes dictate how many nodes can mount the PersistentVolume, and with which capabilities (read/write) - but not the amount of operations it can perform against that volume. Thus, your statement "i found that ReadWriteOnce mode allows a node to read and write once" is inaccurate.
From the docs:
ReadWriteOnce
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.
So no, this has nothing to do with synchronizing access to the underlying storage.
Upvotes: 1