Configuring NLB with Traefik on AWS EKS: Issue with Target Group Port Allocation

"Hi everyone,

I have Traefik installed on an AWS EKS cluster and I'm trying to deploy a Network Load Balancer (NLB) to route traffic to a specific service managed as an ingressRoute. This setup works fine with an ALB, but I'm facing issues with the NLB setup.

When I deploy the NLB service, it creates an NLB that points to a target group with a random port. Consequently, it fails to reach the instances. My service configuration automatically registers the EKS nodes in the target group, but if I manually register instances with one of these ports (32080, 32443), it works correctly.

Here’s my service configuration:

traefik-pci traefik-pci NodePort 172.20.194.26 <none> 9000:32766/TCP,80:32080/TCP,443:32443/TCP 160d

apiVersion: v1
kind: Service
metadata:
name: traefik-nlb-service
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
spec:
type: LoadBalancer
ports:
- name: web
protocol: TCP
port: 80
targetPort: 32080 # not working
selector:
app: traefik

Any insights or suggestions on how to fix the issue with the random port allocation by the NLB? Thank you in advance for your help!"