-
Notifications
You must be signed in to change notification settings - Fork 323
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
[EKS] [Node Group]: Give EC2 instances a Name tag #781
Comments
In general we need our tags to propagate to all resources created by the EKS service as part of a managed node group. |
It's extremely painful to see a huge list of unnamed ec2 instances when you're managing multiple node groups or multiple clusters and can't quickly discern which cluster/node group an instance belongs to. |
Yes as @webster-chainalysis mentioned currently the managed node group tags are not propagated to aws resources. |
There is an issue for propagating all tags: #374 |
Thanks @tobdub I did not see that 👍 |
This is different from #374, as I would not expect the NodeGroup's 'Name' tag to propagate down to each EC2 instance, but a unique Name to be generated for each EC2 instance, probably based on the NodeGroup's 'Name' tag. Similar thinking to what hashicorp/terraform-provider-aws#12451 was looking for, I think. |
Although it's not a perfect fix for the issue described here, the new launch template enhancement (#585) looks like it allows setting static tags for instances and volumes in an EKS managed node group. Caveats include that the tags are static per launch template (i.e., you would likely have a LT per node group or cluster), and it's possible that it's a heavy-handed approach for folks that don't need the rest of the LT knobs. |
hello, has there been a fix on this case? it's really a pain to keep naming blank EC2 instances of the EKS node group even if they are being referenced on the tags section of the EC2. |
There is a workaround: But if you need to specify multiple node groups, not sure how to do it. |
As everyone else has clearly pointed out, using launch templates just to propagate the |
I'm not exactly sure which issue to put this on so I'll probably but it in a decent number of issues but not having propagating Tags to all EKS cluster resources effectively makes this entire service useless. If you can't tag your resources you can't separate out costs between different programs and therefore will never be allowed by a program manager and rightfully so. This needs to be fixed ASAP. |
Is there any solution to this issue yet? |
One year past, it seems that no good solution yet ? |
Any update? |
Any update? |
There is a workaround by using AWS CLI |
How does a tag on the ASG put a name on the EC2 instances? Is there a special tag that will propagate and have some kind of template operation done? |
@TBBle There's an option called "Propagate at Launch" when you add new tags to ASG. |
Won't that propagate the same name to each instance though? Simply adding a tag to the nodes in an instance group is already supported, see #608 (comment) and the docs, so you don't need to add a tag to the EKS-managed ASG and set it to propagate. I had understood this issue to be requesting that each instance get a unique Name tag, e.g., #781 (comment) |
@TBBle The docs mention the launch templates, which does seem like an option (I can't seem to get the tagging set up from CloudFormation though - I haven't specifically tried to troubleshoot that though). It is possible to create Managed node groups without manually created launch templates as well though (and editing the automatically created one seems far from ideal) and those don't seem to have a way to control the tags on the instances (without messing with the ASG or laucnh template that EKS creates) |
I know eksctl uses CloudFormation and Launch Templates to apply tags to managed node group nodes, so it might be worth a trawl through their implementation if you're looking for inspiration. At this point, an AWS person and the AWS docs have said that "tagging EC2 instances" is supported through the launch template, so if you're not satisfied with that, best to raise it as a feature request ticket here, probably giving the rationale as to why it's not sufficient or useable-enough. That's what #608 started as, but it's now focussed on tagging ASGs for their own sake, not for propagating to instances, so it'd just be confusing to post it there. In the meantime, this ticket is still sitting here looking for a way to generate names for EC2 instances from their node-group name, a use-case not covered by any of the existing tickets or systems. |
Really eksctl does that? i dont see in the help eksctl create nodegroup , anything related to tags |
See
It's also demonstrated in the "Launch Template support for Managed Nodegroups" and "Auto Scaling" documentation. The tags configured there will be combined with the "all resources" tags, documented in "Getting Started" and For managed node groups the implementation is in Both are populating |
I created node-group using CloudFormation and added the tag specification in the launch template to populate the same tags on all node-group resources ASG create. NodeLaunchTemplate: |
Amazon, plesase. Add an option for this. Is very ugly to see unnamed instances on EC2 pannel everytime my cluster autoscales |
Any news? |
That's still a manual step post creation of the EKS node group(s), it would be nice if the tags from the EKS node group resource would propagate its tags onto the tags of the ASG which would then propagate to the EC2 nodes themselves. |
If you just want to set constant tags per-nodegroup on the EC2 instances, you can set them now in the Launch Template, e.g. if using eksctl, see the links in #781 (comment).
Perhaps upvote #1541 which is somewhat for this, based on the first comment. The original request didn't talk about propagating tags from NodeGroup to ASG. There's #374 which is similar, but for propagating tags from the Cluster object down to all its contained/owned objects. |
We provision our EKS cluster using terraform-aws-eks-blueprints - this workaround is working for us for applying a
|
What a shame that such a basic thing is missing and no one seems to care |
Community Note
Tell us about your request
Add Name tag to EKS nodegroup instances, based on the node group name.
Which service(s) is this request for?
EKS node groups.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Give EKS EC2 node group instances a Name to make them easier to identify, similar to ECS instances.
Are you currently working around this issue?
Manually adding Name tag.
The text was updated successfully, but these errors were encountered: