kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.93k stars 1.46k forks source link

Auto discovery for cluster-name #745

Closed mats16 closed 5 years ago

mats16 commented 5 years ago

AWS region can be discovered from ec2metadata, it is so cool. https://github.com/kubernetes-sigs/aws-alb-ingress-controller/blob/v1.0.0/docs/examples/alb-ingress-controller.yaml#L50-L53

But we must describe the cluster name yet...

M00nF1sh commented 5 years ago

cluster name can be detected too 😄 Actually its in https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/726

However, most k8s distributions on aws are slightly different. I have to investigate all of them to found the best way to discover cluster name. Currently seems the tags on subnet is a good place.

mats16 commented 5 years ago

Thank you, it is good news for me. Is it better to close this issue?

Currently seems the tags on subnet is a good place.

I wonder it is better use the tags on instances. (using API or metadata)

M00nF1sh commented 5 years ago

Yeah, we can close this issue. some kops distribution didn't apply the kubernetes.io/cluster/cluster-name to instances.(i need to check their source code for this).

akhilles commented 2 years ago

Can this be reopened? https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/726 was closed but cluster name auto-detection hasn't been merged.

bagel-dawg commented 1 year ago

I, too would like to see this included. It's important for my use case to be as generic as possible, so automated discovery is a key feature.