[Supported in Kublr 1.25.0]
Links:
https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
https://github.com/kubernetes-sigs/vsphere-csi-driver/tree/release-3.0
Prerequesties
Kublr cluster v1.20.0 and later with vSphere topology zone aware deployment.
spec: kublrAgentConfig: kublr_cloud_provider: vsphere: region_tag_name: region zone_tag_name: zone locations: - name: vsp vSphere: zoneSupportEnabled: true
Overview
There are two possible migration paths for vSphere migration from in-tree storage driver to vSphere CSI driver: 1) migration to vSphere CSI driver v1.26.0, and 2) migration to v1.27.0 or v3.0.0 and above.
In case of migration to v1.26.0 first, CSI node driver adds labels to each k8s node and uses these labels for PV affinity:
For CSI Driver v1.27.0 and above, CSI node driver uses:
In some cases with upgrade k8s and CSI node drivers you can get PV affinity error from Kubelet
Troubleshooting Kubelet PV affinity error
In some cases when upgrading k8s and CSI node drivers you can get PV affinity errors from Kubelet.
In this case remove current CSINode and CSINodeTopologies CR resources:
and restart CSI-node driver: