Advice and assistance on Rancher cluster provisioning using vCenter and k3s

We have been able to setup and automatically provision a cluster on our VMWare version 7 Server using RKE2 nodes on Rancher 2.7.5 so we know that our configuration settings work.

We would also like to create a k3s cluster automatically. Based on this post that we have found:

We need to install the VMWare CPI and CSI.

We’ve tried that but when we install the CPI we get this error in rancher-vsphere-cpi-cloud-controller-manager.

CrashLoopBackOff (back-off 5m0s restarting failed container=rancher-vsphere-cpi-cloud-controller-manager pod=rancher-vsphere-cpi-cloud-controller-manager-66m7g_kube-system(3c9c3157-e315-4ef2-a75a-ced753157482)) | Last state: Terminated with 1: Error, started: Fri, Aug 25 2023 2:24:17 am, finished: Fri, Aug 25 2023 2:24:18 am

in the pod logs this is:

2023-08-25T01:29:32.057761281Z failed to create listener: failed to listen on listen tcp bind: address already in use

As a result the pod crashes and restarts continuously.

We assume that this is because the built in RKE2 CPI Cloud Controller Manager is running so already has that port.

Initially we thought that the k3s cluster could not be created but after many hours, the k3s cluster started working.

Should it take many hours for the k3s cluster to be created?

Should we have tried to install the CPI App and if so how do we get it to work along side the build in CPI?

Since the k3s cluster started with the external CPI in an error state, am I correct in assuming that there is no need to have the CPI Cloud Controller Manager running?

If this is true, I suppose that we should follow the recommendations in this post:

Which I believe suggests setting: disable-cloud-controller: true when starting the external VMware CPI so that the controller does not start. If that is so then can we set this when installing the CPI App from within Rancher and if yes, how?

Sorry for there being so many questions in one post but we would really like to understand how all this works.


further to my message I found this:

Disable embedded CCM when enabling packaged cloud-provider charts by brandond · Pull Request #1862 · rancher/rke2 · GitHub

but it does not look like the CCM is being disabled.

Perhaps a bug?