1

I have been researching how Kubernetes exposes services to the outside world and have found lots of articles explaining the differences between using NodePort, LoadBalancer, and Ingress.

However not one seems to explain a very fundamental question: What are the use cases where you would actually want to use an ingress controller? The articles describe the three as equivalent methods of exposing services, but they're not. NP and LB are service types. An Ingress controller is a service that you can use to load balance traffic to other services, but it's still a just a service, which means you need to configure a load balancer (Nodeport is discouraged so I'm ignoring it for this discussion) to expose it.

So we now have an external load balancer, pointing to an internal load balancer service, which finally points to the actual services we want to expose.

We have duplicated functionality for worse than no benefit because you're now paying for an external load balancer AND you're cluster is wasting cycles running redundant load balancing services.

The external load balancers provided by the various cloud provider already include functionality like path routing, etc, so why even bother with ingress at all?

The only situations I can think of where it makes sense to use one are:

  • trying to load balance services against intra-cluster traffic
  • you want to route external traffic being directed to multiple hostnames (as opposed to paths) but don't want to have a separate external LB for every hostname. (eg: Using an AWS NLB to accept all traffic, which forwards that to an ingress controller to sort out)
  • you're trying to simulate a complex multi-LB environment and don't have the means to run multiple actual load balancers (eg: using minikube on your laptop)

Do I have the right of it, or am I missing something?

Ilsa
  • 11
  • 1
  • I could copy past this [Ingress vs Load Balancer](https://stackoverflow.com/questions/45079988/ingress-vs-load-balancer), as well as this [Ingress or Service with type: LoadBalancer](https://stackoverflow.com/questions/50839799/ingress-or-service-with-type-loadbalancer) as an answer. – Crou Jul 16 '19 at 08:56

0 Answers0