0

Use case

I want to restore data in my statefulset. So, lets say I have got the snapshot and restored the EBS volume. Now I want my pv object to point to the new EBS volume so that my pod can consume to the restored data. How can I do that ?

Challenges

  1. Restored volume is not attached to EKS instances.
  2. I am unable to edit the existing pv object on the fly.
Aman
  • 193
  • 2
  • 15
  • Did you try `kubectl edit pv ` or `kubectl patch` it ? What errors do you get ? How did you define your original volume ? Was it created manually or provisioned automatically based on a `PVC` ? – mario Aug 02 '21 at 21:02
  • @mario I tried `kubectl edit pv ` to change the volume id to my restored volume. I got permission denied. – Aman Aug 03 '21 at 06:21
  • Apparently it is not allowed. Did you try to get yaml output of your `PV` object i.e. `kubectl get pv -o yaml > my-pv.yaml`, then edit it and `kubectl apply -f my-pv.yaml` again ? – mario Aug 12 '21 at 16:16

0 Answers0