By sniffingdogg
“Persistent Volumes are simply a piece of storage in your cluster. Similar to how you have a disk resource in a server, a persistent volume provides storage resources for objects in the cluster. At the most simple terms you can think of a PV as a disk drive. It should be noted that this storage resource exists independently from any pods that may consume it. Meaning, that if the pod dies, the storage should remain intact assuming the claim policies are correct. Persistent Volumes are provisioned in two ways, Statically or Dynamically.” I have created a PVC but it is not attached to my cluster or any droplet for that matter.
This will be used as a Shared Persistent Volume between two sidecar containers. How do I proceed to have this shared volume in the cluster?
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!
Block storage volumes cannot be mounted to more than one Droplet at a time. So the answer to this is no.
On persistent volumes we have ReadWriteOnce https://www.digitalocean.com/community/tutorials/how-to-deploy-a-php-application-with-kubernetes-on-ubuntu-16-04#step-3-—-creating-the-persistent-volume , true.
But with NFS protocol https://www.digitalocean.com/community/tutorials/how-to-set-up-readwritemany-rwx-persistent-volumes-with-nfs-on-digitalocean-kubernetes you can use ReadWriteMany.
A ReadWriteMany setup on Digital Ocean Spaces can be done with CSI for S3.
Hi there!
You can find information on persisting data in kubernetes workloads.
https://www.digitalocean.com/docs/kubernetes/how-to/add-volumes/
Note that if you are using DO Block Volumes, you will be restricted to that products limitations mentioned at the link below:
https://www.digitalocean.com/docs/kubernetes/overview/#persistent-data
Theres also some great examples of using persistent volume claims as volumes in the kubernetes documentation:
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes
Regards,
John Kwiatkoski Senior Developer Support Engineer
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.