-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Would like to use Nutanix CSI Snapshots to help migrate data from the an old K8S cluster to a new K8S cluster. Both clusters would be on the same physical Nutanx Cluster so the storage would be still be esssentally local to both K8S clusters and migration of data done via the CSI Snapshots.
Order for testing would be:
Source Cluster:
Create a PVC for the data - src-pvc-data
Create new POD which mounts - src-pvc-data to /data
Create soem data in /data mount inside of the pod to know you have the correct source data
Create a VolumeSnapshotClass
Create the VolumeSnapshot
Export he VolumeSnapshotContent and clean up the file for importing into desination cluster
Write some post snap data into /data to see if this shows up in the /data snapshot already taken
Switdch over to new K8S Cluster
Make sure you ahve the same StorageClass in the designation cluster if not create it
Create the Snapshot class if not exists in the desination cluster
Import the VOlumeSnapshotContent that has been cleaned up for import from the Source Cluster
Import the VolumeSnapshot
Create a new PersistentVolumeClaim for the VolumeSnapshot
Finally create a new Pod to mount the VolumeSnapshot to use in a new pod
Verify the data was it is as you took the VolumeSnapshot in the source cluster.
I found the above workflow to be challenging as moving it from source to desination cluster the CSI Driver assums things and does things more dynamically where you coudln't not control the outcome leading to various error messages such as:
Warning SnapshotContentMismatch 56s snapshot-controller VolumeSnapshotContent is dynamically provisioned while expecting a pre-provisioned one Warning SnapshotFinalizerError 27s (x6 over 56s) snapshot-controller Failed to check and update snapshot: snapshot test-snap/test-snap-writer1 expects a pre-provisioned VolumeSnapshotContent snapcontent-a80b9c99-3586-47f6-b8b2-57313aba472b but gets a dynamically provisioned one
In the end i couldn't get the right workflow/sequece to do this sucessfully and repatablly as the CSI driver assums things and didnt' do find the right
Thanks!