My cloud provider moved one of my servers to a new host, so it gets a new ip. This was my nfs server. The cluster nodes can’t connect to it anymore, so I redeployed the nfs-client-provisioner chart with the updated IP, and hoped everything will come up. The provisioner container came up just fine, but nothing else. In the dashboard PVC/edit-view, I saw that the spec/nfs/server points to the old ip. At this point I was like: “Ok, I need to update them manually, it is ~10 file I will do it by hand.” But apparently that field is not mutable.
My question is:
What is the easiest way to modify/recreate PVC volumes with the new IP, without a lot of manual file copy, or multiple rebindings? (It happened on a staging env so it is not super critical, but would be nice to solve this without big data/config loss.)
I’m using v1.15.4-rancher1-2 but I think this is not a rancher or cluster-version specific question.
So I didn’t found any simple way. Edit on ip not working. The delete PV and create the PV with the same name could work, but you need to check the meta and remove the delete-protection. I recreated all my pv-s with a new name, rebinded in the deploys and moved the data from folder-to-folder. Super slow, but everything worked perfectly. For <10 app I think this is a lesser evil. Still interested in a more sofisticated way tho.