When configuring the vSphere Container Storage Plug-in on a native Kubernetes cluster, when creating the csi-vsphere.conf
if using multiple clusters, then cluster id should be unique. If not then this can cause issues with listing PVCs on datastores and with volumes creation on clusters
Example csi-vsphere.conf below
$ cat /etc/kubernetes/csi-vsphere.conf
[Global]
cluster-id = "<cluster-id>"
cluster-distribution = "<cluster-distribution>"
ca-file = <ca file path> # optional, use with insecure-flag set to false
thumbprint = "<cert thumbprint>" # optional, use with insecure-flag set to false without providing ca-file
[VirtualCenter "<IP or FQDN>"]
insecure-flag = "<true or false>"
user = "<username>"
password = "<password>"
port = "<port>"
datacenters = "<datacenter1-path>, <datacenter2-path>, ..."
vSphere 7.0
vSphere 8.0
Kubernetes cluster-id set in csi-vsphere.conf should be unique.
From CSI driver 3.0, if you do not provide the cluster ID field or keep it empty while creating a configuration secret for vSphere Container Storage Plug-in, it automatically generates a unique cluster ID across all clusters.
See VMware vSphere Container Storage Plug-in 3
Steps to resolve are as follows.