Skip to content
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]: EKS Cluster Tagging Propagation #374

Open
tabern opened this issue Jun 17, 2019 · 29 comments
Open

[EKS]: EKS Cluster Tagging Propagation #374

tabern opened this issue Jun 17, 2019 · 29 comments
Labels
EKS Amazon Elastic Kubernetes Service

Comments

@tabern
Copy link
Contributor

tabern commented Jun 17, 2019

Tell us about your request
Ability to propogate EKS cluster tags to EC2 resources (instances, autoscaling groups, load balancers) used as part of the cluster. This will help with resource organization and cost allocation within your AWS account.

Feedback requested
Should we expand the scope of this to include propagating K8s labels to AWS tags and giving you the ability to assign labels used for resources within certain namespaces, services, etc as AWS tags on related resources? This is one path to improving cost allocation capabilities withing AWS and K8s.

@tabern tabern added the Proposed Community submitted issue label Jun 17, 2019
@tabern tabern mentioned this issue Jun 17, 2019
@tabern tabern added EKS Amazon Elastic Kubernetes Service and removed Proposed Community submitted issue labels Jun 17, 2019
@tdmalone
Copy link

Should we expand the scope of this to include propagating K8s labels to AWS tags and giving you the ability to assign labels used for resources within certain namespaces, services, etc as AWS tags on related resources?

Yes - I think this is a great idea. It would be a really ace integration and, other than just for cost allocation, it would make it easier to programatically select k8s-managed resources in custom ops scripting.

@xanderbo
Copy link

First, make it work. Then make it work better. Expanded scope is great as long as it does not delay the release date.

@gmagella-ca
Copy link

I was just deploying a ALB using ALB Ingress controller and I notice that we do have the ability to tag it by annotating the Ingress.

annotations:
alb.ingress.kubernetes.io/tags: auto-delete=no,owner=gmagella,app=my-1st-flask

Looks like it does tag the ALB and the TG. But I couldn't help but notice that it didn't update tags on the ALB, when changing the Ingress details. (it does update the TG tags though).

Let me know if this is not the right venue to comment on this, and I'll take appropriate actions.

@i5okie
Copy link

i5okie commented Jan 9, 2020

Would be nice to propagate these tags to EBS volumes too.

@cdenneen
Copy link

cdenneen commented Oct 5, 2020

Did the tags used to work? I thought they did but all my nodeGroups now no longer have the tags specified in the eksctl configuration. Need to get these tags back in as they are used for Cost reporting.

@tabern
Copy link
Contributor Author

tabern commented Oct 5, 2020

[edit] eksctl can propagate tags for self-managed and managed node groups. however if you use CFN or the API, tags for EKS managed node groups do not propagate. We are working on enabling tag propagation for EKS clusters from the cluster down to nodes through the EKS API.

@jasongaunt
Copy link

Hi @tabern is there anymore news on this please? ♥

@MichaelX99
Copy link

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.

@ayanich
Copy link

ayanich commented Jan 5, 2021

it would be great if labels on EKS resources could be used as cost-allocation tags. The few taggable EKS resources currently do minimal to help us with cost allocation. We need tagging and propagation.

@Andrey9kin
Copy link

Would love to have tags propagated for EKS created security group

@tuxtek
Copy link

tuxtek commented May 5, 2021

I agree with the above statement around making it work as the priority. With the heavy dependency and enforcement around tagging, it is upsetting to see that the behavior we have come to expect with tag propagation is not present in EKS. This is causing us to have to create exceptions and workarounds to problems such as auto scaling groups not being tagged and slowing down velocity as we look to migrate from ECS to EKS.

It would be great to understand what sort of time line we are looking at for resolving this as the priority.

Outside of fixing what is missing today, enabling additional k8s label propagation to aid in further dissecting costs is secondary, I would think. For us, fixing the tag propagation actually gives all of the data we need for cost allocation in EKS.

@saleem-mirza
Copy link

saleem-mirza commented May 5, 2021

eksctl 0.48 will be supporting user defined tagging for EKS resources. Please see https://github.com/weaveworks/eksctl/releases/tag/0.48.0-rc.0

Tags will be propagated to managed and self-managed nodes and its resources such as instances and ebs volumes

@nikitacr7
Copy link

+1. It'll be very good to propagate user defined tags to ENIs using Launch Template

@gkaskonas
Copy link

Any update on this?
Tag propagation from eks node groups to ec2 instances is a no brainer. Some of us use CDK to define our infrastructure and now there is no way to add any custom tags to EKS managed nodes.

@TBBle
Copy link

TBBle commented Mar 31, 2022

For instances specifically, you can set the tags in the Launch Template instead of setting them somewhere higher and propagating them down.

As well as being the approach that AWS has already implemented and recommends for this use-case, this mechanism has the advantage that you can propagate those or other tags to associated EBS volumes for the instance, which ASG-propagated tags do not support. See Tag Auto Scaling groups and instances and Creating a launch template for an Auto Scaling group for reference.

@saleem-mirza
Copy link

eksctl supports custom tag propagation to underlaying resources

@TBBle
Copy link

TBBle commented Apr 1, 2022

I don't think eksctl supports any propagation beyond what EKS already supports. It does have some features to copy tags around from place to place, mostly related to what I described in my previous comment, and for working around #608.

That doesn't cover the use cases described in this ticket, such as "Setting a tag CostCentre=Project2 on the EKS Cluster object will automatically put that tag on the NLB instance created for a LoadBalancer Service".

@saleem-mirza
Copy link

saleem-mirza commented Apr 1, 2022

@TBBle eksctl do support tag propagation since version 0.48. However, tags are only propagated to ec2 and ebs volumes.

ALB or ELB are not created when EKS cluster is created. However, you can always use annotations to push tags to load balancers. see https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/

Disclaimer: I am contributor for tagging support in EKS (eksctl-io/eksctl#3639)

@TBBle
Copy link

TBBle commented Apr 1, 2022

That was my point. The only tag propagation eksctl supports is the one EKS implements: from ASGs to their EC2 instances and from Launch Templates to their EC2 instances and EBS instances. That's the PR you linked to, which implements the eksctl side of that EKS feature. It doesn't do anything more for this than can be done with e.g., CDK or terraform, because it calls the same APIs.

This ticket is asking for exactly the propagation you've noted, for things that do not exist when the cluster is created, but are created later, and still need to be visible for, e.g. cost allocation. Because eksctl is not running "later", it can't support that without an EKS feature behind it. Which is what this ticket is effectively requesting.

The workaround for NLB for example is annotations on the Load Balancer, but that's not propagation, that's just repeating the same tags all through your config (and other cluster user's configs).

@TechIsCool
Copy link

I just encountered another location that tag propagation would be helpful. Granting access via Tags in AWS CloudWatch. the /aws/eks/*/clusters:* audit logs don't have any tags attached from the eks cluster.

@andylim0221
Copy link

+1. It'd be useful especially we are working from Terraform environment.

@mikestef9
Copy link
Contributor

While EKS does not support custom tag propagation which this issue covers, a noteworthy recent improvement we have made is adding a cluster name AWS cost allocation tag to every EC2 instance that joins an EKS cluster. Details in the What's New post.

@vce-xx
Copy link

vce-xx commented Oct 18, 2022

What we are really expecting is to be able to work with our own tagging system already in place.

@mamoit
Copy link

mamoit commented Oct 19, 2022

[edit] eksctl can propagate tags for self-managed and managed node groups. however if you use CFN or the API, tags for EKS managed node groups do not propagate. We are working on enabling tag propagation for EKS clusters from the cluster down to nodes through the EKS API.

@tabern 2 years have passed, still working on it, or should this issue be moved to another column on the roadmap?

IMHO the "use eksctl" approach is not a valid one since if you're doing things in a repeatable way by using terraform, or the likes of it (anything that relies on the API) you won't be using eksctl.
This issue messes up our billing breakdown pretty severely since it relies on tags and therefore there is a lot of unaccounted for resources in the end of the month.

@slam-harmonicinc
Copy link

@tabern We are still waiting for this feature. Any ETA?

@rabidscorpio
Copy link

For anyone using terraform, this comment is gold: #781 (comment)
Tagging the autoscaling group only covers one aspect of the original request but load balancers can be handled with annotations if you're using the load balancer controller.

@andrewegel
Copy link

We would like to see this implemented as well, specifically for the Cloud Watch Log Groups

@seyal84
Copy link

seyal84 commented Jan 17, 2024

Any update on this ?

@DhruvBundheliya
Copy link

Still waiting for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EKS Amazon Elastic Kubernetes Service
Projects
None yet
Development

No branches or pull requests