Guidance to create NLB creation using Ingress

0

I'm reaching out to the AWS community for assistance. Thank you!

I'm trying to set up an internal-facing NLB using Ingress. After applying the provided Ingress manifest, I've observed that the NLB endpoint appears to be empty. Are there any prerequisites I should ensure are in place before proceeding?

ingress-manifest.yaml

apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-service-nlb namespace: tresleai annotations: kubernetes.io/ingress.class: "nlb" #kubernetes.io/role/internal-elb: 1 service.beta.kubernetes.io/aws-load-balancer-type: "internal" service.beta.kubernetes.io/aws-load-balancer-internal: "true" service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "instance" service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:XYZ" service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443" service.beta.kubernetes.io/aws-load-balancer-ssl-negotiation-policy: "ELBSecurityPolicy-2016-08" nlb.ingress.kubernetes.io/security-groups: "sg-8edf9b29776" service.beta.kubernetes.io/aws-load-balancer-scheme: "internal" service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp nlb.ingress.kubernetes.io/scheme: "internal" spec: rules: - host: service.test.ai http: paths: - path: / pathType: Prefix backend: service: name: test-service port: number: 80

I have added the IAM policy - Loadbalancer { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticloadbalancing:CreateLoadBalancer", "elasticloadbalancing:DeleteLoadBalancer", "elasticloadbalancing:ModifyLoadBalancerAttributes", "elasticloadbalancing:RegisterTargets", "elasticloadbalancing:DeregisterTargets" ], "Resource": "" }, { "Effect": "Allow", "Action": [ "elasticloadbalancing:DescribeLoadBalancers", "elasticloadbalancing:DescribeTags" ], "Resource": "" } ] }

R A
asked 14 days ago335 views
2 Answers
1

This has created Application type (internal facing) using Ingress.

I have made two changes, have added these two annotations

  • alb.ingress.kubernetes.io/load-balancer-type: nlb
    
  • kubernetes.io/ingress.class: "alb"
    

Wondering how to deploy an internal facing NLB using Ingress manifest file?

R A
answered 14 days ago
profile picture
EXPERT
reviewed 14 days ago
0

Ingress manifest file is used to create ALB (L7 load balancer), not NLB (L4 load balancer).

You can read more about it here and here.

To create (internal) NLB you need to use the Service manifest instead with type: LoadBalancer. for example:

apiVersion: v1
kind: Service
metadata:
  name: my-internal-nlb-service
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: external
    service.beta.kubernetes.io/aws-load-balancer-scheme: "internal"  # Make the NLB internal
spec:
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
  selector:
    app: my-app
profile pictureAWS
EXPERT
answered 13 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions