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

question: #3632

Closed kylebisley closed 1 month ago

kylebisley commented 6 months ago

Hey All, Asking here hoping someone can at least point me where to start. I'm using aws-load-balancer-controller to provision a NLB servicethat is directing traffic at nginxinside my cluster. This has been necessitated by some client architectural oddities I'll not go into (Normally I'd just use an ALBand be on my way)

The NLBneeds to listen on two specific ports with HTTP(the firewalls forward my traffic on non-standard ports) lets call the ports 7777and 7778. I cannot figure out how to get the aws-load-balancer-controller to provision listeners on those non-standard ports. I've tested it creating them manually and it works as intended but the 7777and 7778 listeners get removed by the ALBeventually.

With an ALB I'd use the annotation alb.ingress.kubernetes.io/listen-ports but I can't find a similar annotation or configuration option in the NLB/service documentation.

I'm close to abandoning the aws-load-balancer-controller at this point but frankly would struggle with how to get my traffic into my pods without its special sauce.

Any direction on this would be very much appreciated.

I'd happily create an update for the docs to codify this guidance if it's thought to be appropriate. Would love to save someone else my troubles.

shraddhabang commented 6 months ago

Hello @kylebisley ,

Have tried using this configuration to expose multiple ports for your service on NLB

apiVersion: v1
kind: Service
metadata:
  name: my-service
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: external 
    service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
    service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
  namespace: my-namespace
spec:
  type: LoadBalancer
  selector:
    app.kubernetes.io/name: MyApp
  ports:
    - name: http
      port: 80
      targetPort: 7777
    - name: https
      port: 443
      targetPort: 7778
k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 1 month ago

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:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 1 month ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/3632#issuecomment-2323085319): >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][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.