https://rancher.com/ logo
Title
s

stale-magazine-62677

02/06/2023, 1:02 PM
Hello vsphere users, I am trying to use the vSphere cloud provider for use with the vSAN CSI Storage driver The cluster deploys fine, but fail when starting "rancher-vsphere-cpi-cloud-controller-manager" and continuously crash-loops. The pod crashes with the following error message:
I0206 12:33:14.147902       1 serving.go:348] Generated self-signed cert in-memory
I0206 12:33:14.943719       1 requestheader_controller.go:244] Loaded a new request header values for RequestHeaderAuthRequestController
W0206 12:33:14.944385       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I0206 12:33:14.945319       1 main.go:160] vsphere-cloud-controller-manager version: v1.24.2
E0206 12:33:14.946287       1 config_yaml.go:136] vsphere.conf does not have the VirtualCenter IP address specified
E0206 12:33:14.946305       1 config_yaml.go:214] validateConfig failed: vsphere.conf does not have the VirtualCenter IP address specified
W0206 12:33:14.946423       1 config.go:69] ReadCPIConfigYAML failed: vsphere.conf does not have the VirtualCenter IP address specified
E0206 12:33:14.946558       1 config.go:73] ReadConfigINI failed: 3:1: expected section header
F0206 12:33:14.946582       1 main.go:265] Cloud provider could not be initialized: could not init cloud provider "vsphere": 3:1: expected section header
The vsphere-cloud-config ConfigMap looks empty
apiVersion: v1
data:
  vsphere.yaml: # Global properties in this section will be used for all specified
    vCenters unless overriden in VirtualCenter section.\n\nglobal:\n  secretName:
    \"vsphere-cpi-creds\"\n  secretNamespace: \"kube-system\"\n  port: 443\n  insecureFlag:
    true\n\nvcenter:\n  \"\":\n    server: \"\"\n    user: \n    password: \n    datacenters:\n
    \     - \"\"\n
kind: ConfigMap
metadata:
  annotations:
    <http://meta.helm.sh/release-name|meta.helm.sh/release-name>: rancher-vsphere-cpi
    <http://meta.helm.sh/release-namespace|meta.helm.sh/release-namespace>: kube-system
....
The vsphere-config-secret is populated with the correct configuration But the vsphere-cpi-creds looks empty:
apiVersion: v1
data:
  .password: ""
  .username: ""
kind: Secret
metadata:
  annotations:
    <http://meta.helm.sh/release-name|meta.helm.sh/release-name>: rancher-vsphere-cpi
    <http://meta.helm.sh/release-namespace|meta.helm.sh/release-namespace>: kube-system
Has anyone here run in to a similar issue?
a

agreeable-oil-87482

02/06/2023, 1:10 PM
When you created the cluster in Rancher and specified the
vsphere
cloud provider, did the UI present you with options for both the CPI and CSI?
s

stale-magazine-62677

02/06/2023, 1:12 PM
The UI prompts me to check the add-on config tab. Only the "vSphere CSI Configuration" options is present in that tab regarding vmware
a

agreeable-oil-87482

02/06/2023, 1:14 PM
Yeah that's a known issue https://github.com/rancher/rancher/issues/39629 it will be resolved once the charts get updated.
s

stale-magazine-62677

02/06/2023, 1:14 PM
I'm deploying with RKE2 to clarify
a

agreeable-oil-87482

02/06/2023, 1:14 PM
https://github.com/rancher/rancher/issues/40194#issuecomment-1401943259 is a possible workaround, but I've not used it yet
s

stale-magazine-62677

02/06/2023, 1:14 PM
oh, thank you. I will have a look
So is this issue solved by running
helm upgrade
On the rancher manager server?
a

agreeable-oil-87482

02/06/2023, 1:19 PM
No, it needs to be from our side and the charts we host
s

stale-magazine-62677

02/06/2023, 1:19 PM
I see, you probably already mentioned it in the GitHUB issues. But what is the ETA on that Chart update?
"Soon" ™️
s

stale-magazine-62677

02/06/2023, 1:23 PM
hehe, ok. Thank you David. I will look into the workaround ™️
I now also see vSphere CPI Configuration