Open santimar opened 1 year ago
I am creating a RKE2 cluster using rancher on a vsphere server and there is no way to set the OS of a given machine pool.
I am creating a machine pool like
resource "rancher2_machine_config_v2" "template-windows" { generate_name = "template-vm-windows" vsphere_config { clone_from = var.vm_template_windows cpu_count = var.cpu_count creation_type = "template" datacenter = var.datacenter datastore = var.datastore disk_size = var.disk_size folder = var.folder memory_size = 4 * 1024 network = [var.network] pool = var.vcenter-pool cfgparam = [] } }
then I let rancher create a RKE2 cluster using the rancher2_cluster_v2 resource
rancher2_cluster_v2
resource "rancher2_cluster_v2" "cluster" { kubernetes_version = "v1.24.9+rke2r2" name = "cluster" cloud_credential_secret_name = rancher2_cloud_credential.vsphere_credential.id rke_config { machine_selector_config { config = { cloud-provider-name = "rancher-vsphere" } } machine_global_config = <<EOF cni: "calico" disable-kube-proxy: false etcd-expose-metrics: false tls-san: - my-kubernetes-domain.com EOF machine_pools { cloud_credential_secret_name = rancher2_cloud_credential.vsphere_credential.id name = "pool-control-plain" ... } machine_pools { cloud_credential_secret_name = rancher2_cloud_credential.vsphere_credential.id name = "pool-workers" ... } machine_pools { cloud_credential_secret_name = rancher2_cloud_credential.vsphere_credential.id name = "pool-windows" control_plane_role = false etcd_role = false worker_role = true quantity = 1 machine_config { kind = rancher2_machine_config_v2.template-windows.kind name = rancher2_machine_config_v2.template-windows.name } } chart_values = <<EOF rke2-calico: {} rancher-vsphere-cpi: ... rancher-vsphere-csi: ... EOF upgrade_strategy { control_plane_concurrency = "1" worker_concurrency = "1" } } }
All the nodes gets created as linux nodes even the windows workers
In rancher2_machine_config_v2 I can't find a way to pick the right OS, but here I can read that:
rancher2_machine_config_v2
Windows features for RKE2 include: Windows supports the vSphere node driver Calico CNI for Windows RKE2 custom clusters Project Network Isolation (PNI) for Calico Windows Containers with RKE2 powered by containerd Provisioning of Windows RKE2 clusters through Terraform Provisioning of Windows RKE2 custom clusters directly from the Rancher UI
Windows features for RKE2 include:
Am i missing something?
Watching this as I am having a hard time finding this information as well.
Rancher Server Setup
Provider Information
Describe the bug
I am creating a RKE2 cluster using rancher on a vsphere server and there is no way to set the OS of a given machine pool.
I am creating a machine pool like
then I let rancher create a RKE2 cluster using the
rancher2_cluster_v2
resourceAll the nodes gets created as linux nodes even the windows workers![image](https://user-images.githubusercontent.com/22396529/227321003-d9439210-915c-4dd1-a114-363765fc2d65.png)
In
rancher2_machine_config_v2
I can't find a way to pick the right OS, but here I can read that:Am i missing something?