This message was deleted.
# general
a
This message was deleted.
c
2 etcd nodes is not a valid configuration, you should always have an odd number of etcd cluster members
s
@creamy-pencil-82913 Apologies for the confusion earlier. I meant to say I have 9 VMs in an on-premises environment: 2 for the control plane, 3 for etcd, and 4 for worker nodes. I would appreciate guidance on setting this up using the Terraform null provider. I'm at the point in automated build where I have three separate lists for each type of VM role(cp,etcd,worker), with each list containing the hostnames and IPs of the VMs. I also have the SSH user and the private key for the SSH user.
c
RKE2 itself does not have a concept of selectable “roles”. Servers are etc+cp. Agents are what Rancher would call a “worker”, they run neither control-plane nor etcd. If you want to have servers that are only control-plane or only etcd, see the docs here: https://docs.rke2.io/install/server_roles
Once you have the cluster up, you can install Rancher to it using the helm chart, as covered in the Rancher docs.
s
Thanks. One last question , how to pass
private_key
to terraform-null-rke2-install ?
c
your what now
do you mean ssh_key?
s
From my understanding , to allow the provider to access the VM and install the agent or server, it requires the server's hostname or IP address, an SSH username, and a method to authenticate—either a password or an SSH key. In this case, the SSH key being referenced is the one intended to be added to the target VM's
authorized_keys
file during cloud-init. The allowed inputs currently do not include fields for providing a password or an SSH key for authentication, how should the initial authentication process be addressed? https://registry.terraform.io/modules/rancher/rke2-install/null/latest?tab=inputs