NLB not created in EKS

92 Views Asked by At

I am having following ingress definition

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
  namespace: kube-system
  annotations:
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/listen-ports: '[{"TCP": 80}, {"TCP": 9093}]'  # NLB supports TCP only
    alb.ingress.kubernetes.io/backend-protocol: TCP  # Use TCP for NLB
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
spec:
  rules:
    - host: dev-kafka-web.binary-labs.in  # Replace with your domain
      http:
        paths:
          - path: /*
            pathType: Prefix
            backend:
              service:
                name: echoserver  # Replace with your service name
                port:
                  number: 80

When I apply this using kubectl command, I see a success message but there is no NLB provisioned in AWS console. I tried checking logs for aws-load-balancer-controller-XXXX but there are no errors found. What am I missing

1

There are 1 best solutions below

0
On

To deploy a Network Load Balancer you don't use ingress that's for ALB, you should use the service directly configured as LoadBalancer type, and set the annotations to configure it as NLB.

The annotation you have service.beta.kubernetes.io/aws-load-balancer-type: "nlb" is correct, but is for the service.

Here is the documentation