containers-roadmap
containers-roadmap copied to clipboard
[EKS] [request]: add "cluster name" to metadata endpoint
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about your request What do you want us to build? A metadata endpoint for EKS clusters that allow applications running within the cluster to get information about a cluster without querying an AWS API. The downward API only provides information about the pod.
Which service(s) is this request for? EKS
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem. I am trying to get the name of the cluster that a pod in running on from within the pod itself.
Are you currently working around this issue? How are you currently solving this problem? I am still debating how to tackle this.
Additional context Anything else we should know?
Attachments If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)
@jicowan do you imagine more data than just the cluster name being exposed?
Yes, @tabern. It might be useful to include other attributes of the cluster, e.g. region, subnets, control plane security group id, etc.
why it is not getting attention here ? this may be useful for us to operate deployment on EKS gathering this kind of details through EC2 METADATA, is there a different way today to gather this information when i am running on the EKS node ?
Hi @tabern, any plans/updates on this issue?
any update? this would help for multi-cluster monitoring
Hi!
Any updates on whether this is getting priority in the near future?
+1
Hey y'all, this request may or may not be implemented, but you may be able to achieve the desired outcome by querying IMDS to get the tags associated with the EC2 instance in order to derive the cluster name.
For example:
$ curl http://169.254.169.254/latest/meta-data/tags/instance/aws:eks:cluster-name
foo
Just be sure to:
- Enable exposing instance tags on the instances (disabled by default)
- Watch out for this issue if you use
/characters in your tag keys. I changed mine to use theKubernetesCluster = {cluster-name}tags instead ofkubernetes.io/cluster/{cluster-name} = owned. You need to be careful not to mess up the tags on the subnets and security groups in the EKS VPC or you might break your setup.
Moving to coming soon