Remove RKE2 cloud-provider?

When I firstly desployed our RKE2 clusters with Rancher, I deployed them with vSphere cloud provider because our intention was to use the vSphere CSI.

However, we recently deployed longhorn on them and we do not want to use the vSphere CSI anymore. So, I would like to know if it would be possible to remove now the vSphere cloud-provider from our RKE2 clusters. I do not know if it is possible to remove the CPI and CSI or at least the CSI because it is now unconfigured and there are useless pods and jobs with errors because the lack of configuration.

Thanks!

Aye,

Could you please provide the ‘machineSelectorConfig:’ sections from the cluster configuration (Cluster Management:Edit YAML). Additionally, please provide the RMS version and RKE2 version.

Cheers,
R2

Thanks R2D2!.

This is the ‘machineSelectorConfig:’

machineSelectorConfig:
  - config:
      cloud-provider-name: rancher-vsphere
      protect-kernel-defaults: false

RMS is 2.8.3 and RKE2 clusters are updated to v1.28.9+rke2r1. These RKE2 cluster were provisioned with Rancher with the VMware vSphere driver.

Just delete only this line: ‘cloud-provider-name: rancher-vsphere’ and save configuration.
This will force reinstallation to native cloud-controller-manager (rke2).

R2

1 Like

Thanks R2D2 ! I just removed the line and it worked right. Regards,

Hello,
I think you can remove the vSphere cloud provider configuration. Longhorn is fully operational and no longer dependent on vSphere CSI or its components. Update your RKE2 cluster configuration files (like cluster.yml) to exclude references to the vSphere CPI (Cloud Provider Interface) and CSI. Clean up any leftover pods, jobs, or configurations related to vSphere CSI that are no longer necessary.