Starting with 1.0.0, we have made one breaking change:
- renaming the plugin from
ebs.csi.aws.com
tobsu.csi.outscale.com
To make things smooth, here a guide to migrate from the two versions
Having a 0.X.X CSI driver installed
Note: You should be able to install both 0.X.X and 1.0.0 plugins as drivers names differ
The difference between the installation explained in the Deploy for a standard upgrade and for this migration is that we need to change the liveness
port of the csi-node
pod. To do that, change the name of the helm (do not use osc-bsu-csi-driver
if the old version already use it) add the following in the helm command
--set sidecars.livenessProbeImage.port=9809
This is to ensure that it would not have conflict between pods from both plugins.
The next step is to migrate all volume from using the old csi driver to the new one. The approach that we will explain is to make snapshot from the previous volumeand create a new one from the snapshot.
- Scale all the application to 0
Warning: Before shutting down the pod that uses volumes, you need to make sure that the
Retain Policy
is set toRetain
-
Create the
Snapshot Class
See this example
-
Make a snapshot from the PVC
Change the
persistentVolumeClaimName
from this example example -
Create the PVC from snapshot
Change the
dataSource.name
from this example -
Change the PVC for the pod and scale up again
-
Once all the volume have been migrated and you check that it work
- Check that the
ClaimName
in the pod (kubectl describe pod <POD_NAME> -n <NAMESPACE>
) is the new one - Check that the all new PVs use the new StorageClass (
kubectl get pv
)
- Check that the
-
Remove all previous PVCs of the old
StorageClass
-
Remove the old
StorageClass
-
Uninstall the old version driver with
helm uninstall osc-bsu-csi-driver --namespace kube-system
korb can be used to ease your PVC migration. This method is easier to run but may take time as it performs data copy.
Steps:
- Have CSI v0 and v1 installed
- Stop pod from using your pvc
- Run korb to migrate your data to a pvc with the same name but with the new storage class
- Start pod
As an example (tested with examples/kubernetes/dynamic-provisioning
), we are migrating ebs-claim
PVC using old storage class ebs-sc
to the new storage class bsu-sc
:
korb ebs-claim \
--kube-config ~/your/kube_config_cluster.yml \
--new-pvc-storage-class bsu-sc \
--source-namespace dynamic-p \
--strategy copy-twice-name
Note: The copy-twice-name
strategy will copy the PVC to the new Storage class and with new size and a new name, delete the old PVC, and copy it back to the old name.