This article provides an insight on vSphere Container Storage Plug-in migration process referred to in the VMware CSI documentation
Symptoms:
After upgrading TKGi from 1.13 to 1.14 , CSI Migration could be stuck in progress.
Warning FailedAttachVolume 40m (x9 over 43m) attachdetach-controller AttachVolume.Attach failed for volume "pvc-<ID>" : rpc error: code = Internal desc = failed to get VolumeID from volumeMigrationService for volumePath: "[<ID>] kubevols/<ID>.vmdk"
VMware Tanzu Kubernetes Grid Integrated Edition 1.x
VMware vSphere Cloud Native Storage (CNS)
VMware vSphere Container Storage Interface (CSI) Driver 2.x
As per this VMware Tech Docs page, statically provisioned in-tree volumes must have specific annotations.
Adding the missing annotations manually to the PVs and PVCs yaml file and then deleting the pods associated will solve the issue.
Annotation on PV:
annotations: pv.kubernetes.io/provisioned-by: kubernetes.io/vsphere-volume
Annotation on PVC:
annotations: volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/vsphere-volume