I have run some standard Azure IaaS kubernetes clusters for 3 years in production (~ 40 nodes). Because of recent corporate security changes and kubernetes design improvements, in particular the management of CSINodes, I decided to move back from Azure file storages to Longhorn. This scenario has been validated on other clusters.
In production, I would like to move persistent volume from an initial storage class to another one. Let's say storage_class_1 to storage_class_2.
storage_class_1 inherits from Azure File whereas storage_class_2 inherits from longhorn. Persistent volumes are dynamically generated using RabbitMQ operator.
When modifying the CRD definition, no new PV is created and old ones are still bound.
persistence:
storageClassName: storage_class_2
storage: 10Gi
I am looking for a way to update the PV without losing any data nor stopping the service. Any idea?
Some technical information: Kubernetes : 1.19.8 Docker : 20.10.2 RabbitMQ Cluster Operator : 1.5.0
I have finally found the right sequence: