Hey Folks, I'm trying to create a RKE2 Cluster usi...
# rke2
g
Hey Folks, I'm trying to create a RKE2 Cluster using a custom node driver, building off the docker-machine-driver-vultr
Copy code
Rancher CLI	v2.10.1
Helm	v2.16.8-rancher2
Machine	v0.15.0-rancher125
OS: Ubuntu 22.04
this works for RKE1 but it doesn't for RKE2. Is there any documentation for building RKE2 clusters on Rancher with custom node drivers? i can get the VMs provisioned on Vultr but when i ssh into them it RKE2 agent doesn't bootstrap the nodes and is waiting on or have any rancher related components.
Configuring bootstrap node(s) test-controller-hdq47-xrjph: waiting for agent to check in and apply initial plan
When i inspect the pod it seems to stop the provisioning because of custom install script? im not sure. What/where is it getting bootstrapped?
Copy code
Trying to access option  which does not exist
THIS ***WILL*** CAUSE UNEXPECTED BEHAVIOR
Type assertion did not go smoothly to string for key
Running pre-create checks...
Creating machine...
(test-controller-hdq47-xrjph) VPS vlus-pool1-hccj6-jq45w successfully created
(test-controller-hdq47-xrjph) Waiting for VPS vlus-pool1-hccj6-jq45w to get ip assigned
(test-controller-hdq47-xrjph) Waiting for VPS vlus-pool1-hccj6-jq45w to get ip assigned
(test-controller-hdq47-xrjph) Waiting for VPS vlus-pool1-hccj6-jq45w to get ip assigned
(test-controller-hdq47-xrjph) VPS vlus-pool1-hccj6-jq45w is now configured with ip address 140.82.5.96
Waiting for machine to be running, this may take a few minutes...
Custom install script was sent via userdata, provisioning complete...
(test-controller-hdq47-xrjph) Closing plugin on server side
(temp-driver-loader) Closing plugin on server side
c
RKE2 and K3s do not use any of the ssh/docker stuff that RKE1 does. Basically all it does it create an instance on the cloud provider, passing through cloud-init data that runs an install script to pull things down from Rancher.
If your node driver doesn’t support pass-through of cloud-init userdata, it won’t work.
g
Are there any references or direction you can point me in to support this? Im new to RKE2 and want to build upon the current node driver and support RKE2.
I appreicate your reply
c
What do you mean “to support this”? It is what it does. You could look at the built-in node drivers if you need a reference point.
This isn’t so much an RKE2 thing as it is a rancher thing and I only work on K3s and RKE2.
Long term Rancher will deprecate the node drivers in favor of capi machine providers, but this is a ways out as the current capi machine providers make a LOT of assumptions, for example the EC2 capi provider assumes you’re using EKS and are going to set everything up for that. Same with CAPA and CAPG for Azure and Google.
👍 1
https://github.com/rancher/machine/commit/d312d3d97950546856eaeb2c8434883152db5362 for the change that added support for custom install script, which is what RKE2 and K3s (v2prov in Rancher-speak) rely on.
g
Thanks for that, Brandon. i will look into the built-in providers to see how they are handling RKE2 with node drivers..Moving forward, what is the best way for infrastructure providers to offer RKE2 via Rancher? Do providers need to create a built-in solution in Rancher? Thanks for your explanation
c
Right now the answer is still node driver with cloud-init userdata support, but be looking at CAPI.