-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managed Node Groups with Launch Template using Spot Instances: Taints #1214
Comments
should be possible with #1138 |
Would you mind adding an example that uses managed node groups, spot instances, labels and taints all together? It'd be super helpful. |
@ArchiFleKs do I need to use a launch template in order to apply taints to managed node groups instances? It seems I can't override this parameter on a per-node-group basis: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/modules/node_groups/locals.tf#L16 Other parameters are being overridden successfully, like "root_volume_size" works fine, although I just noticed that "root_volume_size" is not even a parameter here: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/modules/node_groups/locals.tf#L17 node_groups = {
prometheus = {
create_launch_template = true
desired_capacity = 1
max_capacity = 2
min_capacity = 1
instance_types = ["c5.xlarge", "c4.xlarge"]
capacity_type = "SPOT"
disk_type = "gp2"
disk_size = 20
kubelet_extra_args = "--register-with-taints=dedicated=prometheus:NoSchedule"
additional_tags = var.prometheus_mng_additional_tags
k8s_labels = {
"role" = "worker"
"group" = "prometheus"
}
}
} Seems that the |
@cabrinha what do you mean on a per node group basis ? Your config seems right yes. What is happening ? Pre user data is node working because user data is merge with official AMI. I think there is discussion about this in the PR comment. |
I need to change the taints per node group -- Prometheus group needs a different taint than Nginx. node_groups = {
prometheus = {
kubelet_extra_args = "--register-with-taints=dedicated=prometheus:NoSchedule"
}
nginx = {
kubelet_extra_args = "--register-with-taints=dedicated=nginx:NoSchedule"
}
}
@ArchiFleKs can you test my configuration on your side? |
This explains why it's not working: #1138 (comment) |
I just tested with
It is working as expected |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I have issues
I'm submitting a...
What is the current behavior?
Creating a Managed Node Group does allow using Spot Instances and setting additional k8s labels on the node, but doesn't seem to allow specifying taints using
kubelet_extra_args
.If this is a bug, how to reproduce? Please include a code sample if relevant.
working from the example: https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/launch_templates_with_managed_node_groups
Adding
kubelet_extra_args
to the template_fileThis results in
NodeCreationFailure
withInstances failed to join the kubernetes cluster
in the AWS console.What's the expected behavior?
Is there any way to using managed node groups, with spot instances, with taints?
Are you able to fix this problem and submit a PR? Link here if you have already.
Environment details
Any other relevant info
#1211
The text was updated successfully, but these errors were encountered: