I have an EKS cluster with nodegroups created in AWS and now we need to create a NLB for that cluster as service
The problem is it's creating the NLB with new target group but we need use the target group which is already created manually
I tried the following code but its still creating the new target groups
Anything to be updated here
apiVersion: v1 kind: Service metadata: name: my-nlb-service annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:REGION:ACCOUNT_ID:certificate/CERTIFICATE_ID" service.beta.kubernetes.io/aws-load-balancer-target-groups: "443=arn:aws:elasticloadbalancing:REGION:ACCOUNT_ID:targetgroup/TARGET_GROUP_ARN_443,8883=arn:aws:elasticloadbalancing:REGION:ACCOUNT_ID:targetgroup/TARGET_GROUP_ARN_8883" spec: ports: - name: https port: 443 targetPort: 443 protocol: TCP - name: mqtt port: 8883 targetPort: 8883 protocol: TCP selector: app: your-app-label type: LoadBalancer loadBalancerSourceRanges: - 0.0.0.0/0