We have a running cluster created with rancher and now we need to enable vsphere as cloud provider for storage.
In the “Kubernetes Options” the Cloud Provider is not editable.
Are we supposed to modify the yaml by hand? Is this the right approach?
Just deleted the cluster after seeing this in RKE docs:
After you launch the cluster, you cannot change your network provider. Therefore, choose which network provider you want to use carefully, as Kubernetes doesn’t allow switching between network providers. Once a cluster is created with a network provider, changing network providers would require you tear down the entire cluster and all its applications.
However we had some problem activating the provider in an existing cluster: when Rancher started updating nodes, the nodes changed their name from the name we provided them when cluster was first created (–node-name option) to VM’s hostname, so that Rancher itself was unable to recognize them and it lost cluster control (that’s why I posted this question).
So, to add the provider, we had to create a new cluster and migrate workloads to it.
If you didn’t provide custom node names, or you know how to handle their change, you can try adding the provider config. Once added, you also have to patch nodes K8s level to add to their description the vSphere ID, as suggested by this article, with something like this:
For me deleting and creating a new cluster also didn’t work for some reason, so i’ve deleted rancher altogether, and right now installing it from scratch.
For me deleting and creating a new cluster also didn’t work for some reason
Had the same issue in a brand new Rancher installation, first attempt my cluster had no provider after fresh cluster setup using yaml config during creation, so I had to add it as described in previous post. The second time I tried to create a new cluster, it worked out of the box. I suspect some indentation issue in the provider’s mode in my yaml when I copy-pasted it in the web UI the first time.