By parthivgls
I want to use Digital Ocean Volume to store the data which is shared across the pods on a same cluster. Multiple pods will be reading and writing from the same volume at a same time.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
When you need to write and access persistent data in a Kubernetes cluster, you can create and access DigitalOcean Block Storage Volumes by creating a PersistentVolumeClaim (PVC) as part of your deployment. I would recommend following the steps from the official DigitalOcean documentation on how to add Block Storage Volumes to a Kubernetes Cluster:
https://www.digitalocean.com/docs/kubernetes/how-to/add-volumes/
Hope that this helps! Regards, Bobby
DigitalOcean does not support parallel read/write modes unfortunately:
See: https://docs.digitalocean.com/products/kubernetes/how-to/add-volumes/
accessModes must be set to ReadWriteOnce. The other parameters, ReadOnlyMany and ReadWriteMany, are not supported by DigitalOcean volumes. See the Kubernetes documentation for more about …
In theory if all your pods run on the same node, they should be able to read/write together, but then you cannot scale out with multiple nodes. Also, you won’t be able to do a 0-downtime node replacement, since the second node cannot attach until the first one is down.
I am in need for a solution to this problem, but haven’t investigated yet. I suspect the solution to be in setting up a custom network fileserver (like nfs, or gluster) on kubernetes. It seems that kubernetes supports NFS as a volume option as well, so then you don’t need to modify container images to set up the mounting.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.