[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
In case with vSphere migration from in-tree storage driver to vSphere CSI driver, have two possible migration ways. If you try to migrate to vSphere CSI driver v1.26.0 or above and migration to v1.27.0 or v3.0.0 and later.
In case with migration to v1.26.0 first, CSI node driver add labels to each k8s nodes and use this labels for PV affinity:
For CSI Drivers v1.27.0 and later, CSI node driver use:
In some cases with upgrade k8s and CSI node drivers you can get PV affinity error from Kubelet:
Solution
If you get PV affinity issue, just remove current CSINode and CSINodeTopologies CR:
and restart CSI-node driver: