This tutorial guides you on migrating Persistent Volumes (PVs) from the gp2 storageClass to the new default gp3 storageClass. Before implementing this process in production, it is advisable to perform a thorough test in a testing environment.
Important:
The migration process includes PVC removal and heavily relies on replication between brokers. Before beginning, validate that there are no errors or warnings.
To avoid data loss, ensure all critical stations with data are configured with at least 3 replicas.
Every step should be executed with continuous log monitoring, paying extra attention to the replication process during the broker startup.
Step 1: Create a new storageClass.yaml file with the required configuration.
kubectl get storageclasses.storage.k8s.io
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
gp2 kubernetes.io/aws-ebs Delete WaitForFirstConsumer false 614d
gp3-ol kubernetes.io/aws-ebs Delete WaitForFirstConsumer true 328d
gp3-new (default) ebs.csi.aws.com Delete WaitForFirstConsumer true 248d
Step 5: Update PVCs
Delete the PVC (data-memphis-metadata-0) associated with the old storageClass. The pod itself will also be deleted, resulting in a new PVC assigned to the new storageClass
Ensure the metadata finishes the sync process before going to the next pod.