This message was deleted.
# terraform-provider-rancher2
a
This message was deleted.
b
As I mentioned “Unfortunately, there is not much in resource documentation” for RKE2. For example, how to change service_cluster_ip_range and cluster_cidr (these are RKE1 settings). How to set max_pods for kubelet.
m
Copy code
machine_global_config = <<-EOT
      cni: "cilium"
      disable-kube-proxy: true
      disable-cloud-controller: true
      etcd-expose-metrics: false
      cluster-cidr: ${var.k8s_cluster_cidr}
      service-cidr: ${var.k8s_service_cidr}
      cluster-dns: ${var.k8s_cluster_dns}
      tls-san: [${join(", ", var.k8s_tls_sans)}]
      EOT
the
machine_global_config
setting is what you're looking for.
I to understand how the Terraform settings work it's helpful to change settings in the Rancher UI and then switch to edit YAML to see what effect it had
b
Thanks, appreciate it. I think the last question is how to set max_pods for kubelet?
m
no idea. Can you set than in the UI?
b
in “advanced” it exposes kubelet extra args wich becomes the following : machineSelectorConfig: - config: cloud-provider-name: flexpod kubelet-arg: - max-pods=500 protect-kernel-defaults: “false”
So I guess I could use it as machine_selector_config { config = { cloud-provider-name = “flexpod” protect-kernel-defaults = false kubelet-arg = [“max-pods=500"] }
will try if it works. But I also need to set node-cidr-mask-size = “23” somewhere
Not sure where, in RKE1 it was a part of kube_controller extra_args. I’m using cilium for CNI with disabled kube-proxy and cloud-controller. Somewhere in rke2-cilium chart_values?
Figured it out. This machine_global_config does the job
👍 1
173 Views