I want to know if it's possible that multiple PersistentVolumeClaims bind to the same local persistent volume.
My use-case if the following: I want to build a Daemon Set that will write some data (the same data actually) on each node on my cluster (on the node's local disk). Then, any other pod that is scheduled on any node should be able to read that data. Basically a kind of write-once-read-many policy at the node level.
I know that I can do that using the hostPath type of volume, but it's a bit hard to manage so I found out that local-storage would be a better approach.
My wish would be the following:
- Create the local Persistent Volume (named pv) with ReadWriteOnce and ReadOnlyMany access modes
- Create the first persistent volume claim (pvc1) with ReadWriteOnce access mode and use it in the DaemonSet that writes the data in the volume. So pvc1 should bind to pv
- Create the second persistent volume claim (pvc2) with ReadOnlyMany access mode that is used in any other pod that reads that data (so pvc2 should also bind to pv)
Is this possible?
I read that if a PVC is bounded to a PV, then that PV is "locked", meaning that no other PVC can bind to it. Is this really how it works? If seems a bit limiting for that kind of scenarios, where we have write-once-read-many operations.
Thanks!