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.89k stars 1.45k forks source link

Request to add a feature to support the same targetgroup with same instance targets but with multiple ports #3719

Open balusarakesh opened 4 months ago

balusarakesh commented 4 months ago

Our setup:

load balancer controller version: v2.7.2 EKS version: v1.28.8 Calico network setup

Service config:

apiVersion: v1
kind: Service
metadata:
  name: nginx
  labels:
    app: nginx
    app.kubernetes.io/managed-by: Helm
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'false'
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-path: /status
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: traffic-port
    service.beta.kubernetes.io/aws-load-balancer-healthcheck-protocol: tcp
    service.beta.kubernetes.io/aws-load-balancer-name: k8s-nginx
    service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
    service.beta.kubernetes.io/aws-load-balancer-scheme: internal
    service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: preserve_client_ip.enabled=false,stickiness.enabled=false
    service.beta.kubernetes.io/aws-load-balancer-type: external
spec:
  ports:
    - name: https
      protocol: TCP
      port: 443
      targetPort: 443
      nodePort: 31315
  selector:
    app: nginx
  type: LoadBalancer
  externalTrafficPolicy: Cluster
  allocateLoadBalancerNodePorts: true
  loadBalancerClass: service.k8s.aws/nlb
  internalTrafficPolicy: Cluster

Is your feature request related to a problem? Yes, Currently an AWS Network Load Balancer supports only 55000 connections per minute for a unique target and ip combo. We are frequently receiving PortAllocationError on our network load balancer.

The only solution to this problem is to add more nodes which is expensive OR setup a new load balancer for the same set of pods on a different service so that we get a different NodePort and this way we can double the connections per minute on the load balancer as we now have a second load balancer for the same set of nodes but with a different port

Describe the solution you'd like A way to create a targetgroup through load balancer controller for the SAME set of instance targets but for multiple ports. Currently this is possible in AWS by adding targets manually (check the screenshot, for the same node we are able to add multiple ports)

Essentially we want the targetgroup to be able to refer to the same set of instances but on multiple ports this way we can get around the 55000 connections per minute limit from AWS.

Describe alternatives you've considered A description of any alternative solutions or features you've considered.

Screenshot 2024-05-24 at 1 59 01 PM

k8s-triage-robot commented 1 month 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 3 days 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