Create nodegroups using config file or spec block
Opened this issue · 0 comments
abhinavgpt commented
Hi :)
I am trying to add nodegroups dynamically to the cluster using the eksctl_nodegroup
resource, but this resource currently only provides options which are supported by eksctl CLI. Unfortunately, I have to use the option overrideBootstrapCommand to set kubelet arguments, which is not supported by the CLI. I cannot add this nodegroup in the eksctl_cluster
resource since nodegroups are created and deleted dynamically. Is there any way to do this using this provider?
Essentially I am looking to be able to add nodegroups to an existing cluster using code like:
resource "eksctl_nodegroup" "default" {
name = "ng1"
region = us-east-1
cluster = test-cluster
spec = <<-EOS
managedNodeGroups:
- name: ng1
privateNetworking: true
instanceType: t3.medium
ami: "ami-0ef0c69399dbb5f3f"
overrideBootstrapCommand: |
#!/bin/bash
/etc/eks/bootstrap.sh test-cluster --kubelet-extra-args "--kube-reserved=cpu=140m,memory=2.6Gi"
EOS
}
Any pointers are highly appreciated :)