Configuring Ingress
As mentioned at the beginning of the chapter, Ingress provides a granular mechanism for routing requests into a cluster. Ingress does not replace Services but augments them with capabilities such as path-based routing. Why is this necessary? There are plenty of reasons, including cost. An Ingress with 10 paths to ClusterIP
Services is a lot cheaper than creating a new LoadBalancer Service for each path – plus it keeps things simple and easy to understand.
Ingresses do not work like other Services in Kubernetes. Just creating the Ingress itself will do nothing. You need two additional components:
- An Ingress controller: you can choose from many implementations, built on tools such as Nginx or HAProxy.
- ClusterIP or NodePort Services for the intended routes.
First, let's discuss how to configure the Ingress controller.
Ingress controllers
Generally, clusters will not come configured with any pre-existing Ingress controllers. You...