1

I am deploying kubernetes nginx-ingress on AWS. Is there any way to prevent auto creation of network loadbalancer and me assigning an already existing load balancer in the config?

If not, is there any way to provide custom name to AWS NLB from within the nginx ingress configuration?

rock'n rolla
  • 1,883
  • 1
  • 13
  • 19
Hitesh jain
  • 103
  • 9
  • What have you tried so far? What errors are you getting? – paltaa Apr 01 '21 at 13:39
  • I’ve looked up the kubernetes annotations and nginx-ingress. Haven’t seen anything regarding using existing load balancer or defining custom names for auto creation of same. Whenever I apply the ingress yml, it creates a load balancer and the corresponding ingress rules as the aws iam role allows the cluster to auto create the components. I’ve only seen annotations to control tags of ingress not name. Also there is no way to rename the LB after creation. Is there any way I can control the naming while creation? – Hitesh jain Apr 02 '21 at 15:08

1 Answers1

2

No, what you're asking for is not supported. There's no way to configure nginx ingress controller to create NLBs with specific names or use existing NLBs.

You can however do this manually if you set the nginx ingress controller serviceType to NodePort and then manually register the targets into the NLB (via the console, CLI etc).

Note that it's not ideal to have things configured outside of Kubernetes in this way because there is a tendency to forget that ingress changes aren't synced to the NLB.

Make sure to check the security groups of your nodes to allow traffic from the load balancer to the exposed ports on your nodes.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Jason
  • 301
  • 2
  • 4