1

We are running kubernetes on centos7 on premises from past 3years, Recently our NFS storage device was migrated to different VLAN and there was a change in IP address, now none of pods are functioning properly and waiting for PV.

My question is what is best possible way to replace old NFS server IP with new NFS server IP in PV and all PVC without loosing any data?

2 Answers 2

1

The .spec.nfs from a PV would be immutable.

You can't delete (and recreate) a PV that is Bound.

Then, you would have to delete and recreate all PV and PVCs.

One way to avoid further disturbances would be to use a DNS name reaching your NFS server.

1

I hope you have all the K8s yamls with you.

Delete the pod/deployment/stateful set, delete the PVC and PV.

Edit the PV yaml and fix the NFS server IP address.

Apply yamls of PV, PVC and pod/deployment/stateful set.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .