Hi everyone đź‘‹
We ran into an issue some time ago and would really appreciate it if someone could help review and update it.
Issue summary:
When provisioning RKE2 clusters from Rancher using the Harvester cloud provider, the clusters would get stuck in the “Machine creating” state.
This happened primarily when deploying into specific namespaces. (When we did via UI there is no issue, it crates all the required SA and configs)
After some investigation, @few-appointment-23216 identified a potential root cause related to this documentation:
https://registry.terraform.io/providers/rancher/rancher2/13.1.4/docs/resources/cluster_v2#create-a-node-driver-cluster-with-harvester-as-the-infrastructure-provider
Specifically, when retrieving the kubeconfig for the imported Harvester cluster, it appears that the ServiceAccount is not created in the Harvester cluster, which causes the provisioning process to stall.
Workaround:
As a temporary solution, we used the following script to generate the kubeconfig and create the required ServiceAccount for the guest clusters:
https://raw.githubusercontent.com/harvester/cloud-provider-harvester/master/deploy/generate_addon.sh
If this can be fixed properly upstream, it would be greatly appreciated.
Thanks in advance to anyone who can take a look! 🙏