aws-load-balancer-controller
aws-load-balancer-controller copied to clipboard
ALB ingress object to contain listener ARN
Is your feature request related to a problem?
I am trying to integrate AWS HTTP API gateway using apigatewayv2 ACK . One of the parameters I need to provide is integrationURI
which is an ARN of ALB Listener.
Describe the solution you'd like ALB ingress object to contain listener ARN so I can query for it dynamically.
The TargetGroupBinding
has spec.targetGroupARN
which will let you query the load balancer for listeners.
@wildtapir, you could describe the load balancer based on the name which you can get from the ingress status field. Once you have the load balancer ARN, you get the listeners.
Thanks @kishorj ! Gould you please give me an example?
I start with kubectl get ingress demo-service -o yaml
Here is one way to do it
- From the kubectl output, look for the status field, you will see the load balancer DNS name
- Extract the load balancer name, for example if dns name is
k8s-default-demoserv-xxx-yyy.REGION.elb.amazonaws.com
, lb name isk8s-default-demoserv-xxx
- describe load balancer,
aws elbv2 describe-load-balancers --names k8s-default-demoserv-xxx
, get theLoadBalancerArn
- describe listeners,
aws elbv2 describe-listeners --load-balancer-arn arn:aws:elasticloadbalancing...
Thanks @kishorj for prompt response. I cannot use aws cli
here as requirement is to be able to query for data k8s objects only. I am using helm and there is lookup
function (which is kind of kubectl get).
I was looking at TargetGroupBinding
but I cannot find anything there that would map spec.targetGroupARN
to AWS LoadBalancer. Only reference is serviceRef
(which might have multiple load balancers)
This controller applies labels to all k8s resources it creates, for example all TargetGroupBinding resources created by this controller have the following labels:
- explicit IngressGroup
-
ingress.k8s.aws/stack: groupName
-
- implicit IngressGroup:
-
ingress.k8s.aws/stack-namespace: namespace
-
ingress.k8s.aws/stack-name: ingressName
-
- NLB (service of type LoadBalancer or with NLB annotations)
-
service.k8s.aws/stack-namespace: namespace
-
service.k8s.aws/stack-name: serviceName
-
You should be able to associate the TargetGroupBinding resources to your ingress stack based on the lablels.
Thank you @kishorj . Let me be more clear. What I need is listener arn
of an ALB. listener arn
is not the same as targetGroupARN
. Do you know of any object in k8s that would contain listener arn
of an ALB?
I have similar a problem. @wildtapir any luck so far?
Hi @eligithubacc. Nope, I was not able to use kubectl
only to get listener arn
.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied- After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied- After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closedYou can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.