By Jørgen Tvedt
I have a Velero backup going that produces volume snapshots of our production environment. Now I need to load and copy the data from one of these snapshots, in a test environment. Basically, I want to copy the state from production, but can’t do a full Velero restore. I created a volume from the snapshot and was asked to attach it to a droplet, so I chose one of the test K8s cluster’s nodes. This all seems fine, but I can’t figure out how to make this volume available to a pod. I have a test pod, which I can attach to the existing k8S volumes by setting it up with existing PersistedVolumeClaims. These are existing volumes created using PVCs. For the new volume, I tried to duplicate and modify the exists PVC, replacing the volume name/id with the one I configured in the DO web. Then I tried to start the pod with this configuration. However, K8s says the pod and the PVC failed because the PVC in “unbound” / “ClaimLost”. In any case, I guess the test pod must run on the cluster node where I assigned the volume.
Any advice on how to mount a new DO volume, containing restored data, onto a K8s pod?
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!
Hi there,
You’re right; you will need to create a PersistentVolume (PV) and a PersistentVolumeClaim (PVC) to make this volume accessible to your pods.
You can follow the steps here on how to add volumes to a Managed Kubernetes Clusters:
https://docs.digitalocean.com/products/kubernetes/how-to/add-volumes/
What I could also suggest is using the Snapshooter service which under the hood also uses Valero:
Best,
Bobby
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.