Hi,
is it possible in any way to create a PVC / PV and link it to a currently existing, unbound volume, which was previously created via a Kubernetes cluster? If this would be possible, it would enable quick migration of huge datasets in case of severe cluster failures. Any documentation or planned work on that?
Dennis
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!
Dennis,
I needed a way to transfer data between separate clusters as well -the same use case as you described.
Instead of trying to create another PVC and get k8s/digitalocean link the existing target volume to it, I had the k8s pod refer to it via the ‘hostpath’ construct. ( https://kubernetes.io/docs/concepts/storage/volumes/#hostpath )
Steps:
Detach the volume from the droplet.
Attach it to the target droplet . This is the droplet ( node) that you will want to ‘select’ in your k8s pod or deployment script.
Login to your droplet and mount it ( https://www.digitalocean.com/docs/volumes/how-to/mount/)
I assume you’ve mounted it under /mnt . ( will be referenced next)
Use the followin stanza in your k8s ( here it is a pod ) script:
volumeMounts:
Finally, apply your script.
I hope that helps.
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.