When listing the CSI pod on the Cluster, the csi pods are stuck in CrashLoopBackOff state.
kubectl get pods -A | egrep "NAME|csi"
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system vsphere-csi-controller-<ID> 5/7 CrashLoopBackOff 24 10m
kube-system vsphere-csi-node-<ID> 2/3 CrashLoopBackOff 10 5m
kube-system vsphere-csi-node-<ID> 2/3 CrashLoopBackOff 10 1m
vsphere-csi-controller log: Found in /var/log/pods/vmware-system-csi_vsphere-csi-controller-<ID>/vsphere-csi-controller/#.log
failed to create govmomi client with err: ServerFaultCode: Cannot complete login due to an incorrect user name or password.
failed to connect to VirtualCenter host: \"vc.fqdn.com\", Err: ServerFaultCode: Cannot complete login due to an incorrect user name or password.
vsphere-syncer log: Found in /var/log/pods/vmware-system-csi_vsphere-csi-controller-<ID>/vsphere-syncer/#.log
failed to create govmomi client with err: ServerFaultCode: Cannot complete login due to an incorrect user name or password.
Cannot connect to vCenter with err: ServerFaultCode: Cannot complete login due to an incorrect user name or password.
2.x
CSI secret on the Cluster does not match the password configured for the user in the vCenter.
Follow the below steps:
kubectl get secrets vsphere-config-secret -n kube-system -o jsonpath='{.data.csi.vsphere\.conf}' | base64 -d
# cat <[Global]
[Global]
insecure-flag = true
cluster-id = kube-system/cluster-01
[VirtualCenter "vc.fqdn.com"]
user = "[email protected]"
password = ""
datacenters = "DC"
insecure-flag = true
[Network)
public-network = “/######/network/######/SEG-######”
EOF
kubectl edit secrets vsphere-config-secret -n kube-system
kubectl delete pod <csi-pod-name> -n kube-system
Pods should now be up and running.
Note: If the issue still persists then