Can I Use a Shared Read-Only Volume Across All Pods That Automatically Updates?

August 4, 2025 3 answers
Asked by 106 beats today
I'm working with a Docker-Compose setup where my application plugins are in a persistent volume. This allows me to update the plugins without needing to rebuild the image each time. I'm transitioning to Kubernetes and want something similar. My goal is to have a shared read-only volume for all my nodes and pods that automatically updates when the volume is changed. Is this feasible? If not, what alternatives could I consider for achieving this?

Answers

ripple counter
It seems there might be a misunderstanding about how volume updates work. Volumes donโ€™t automatically sync changes across pods. If you set up a volume correctly, like using ReadOnlyMany, all pods will access the same volumeโ€™s contents, but they won't see updates instantly. To share updated data, you might want to consider solutions like 'git-sync' where updates are pulled from a central source.
Reply to this answer
_piano technician
If youโ€™re using a block device with a traditional filesystem, it gets tricky. Generally, you can either mount it read-only for everyone or mount it once exclusively. If updates happen on one node, other nodes wonโ€™t be notified of those changes immediately because of caching in memory. The best approach would be to use something like git-sync or a distributed filesystem designed for this type of scenario.
Reply to this answer
another perspective
Yes, you can create a ReadOnlyMany volume and mount it across all pods. Just make sure you have a compatible storage solution, like Longhorn, that supports this kind of setup.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions