15 Managing incoming traffic with Ingress
Services bring network traffic into Kubernetes and you can have multiple LoadBalancer Services with different public IP addresses to make your web apps available to the world. But that's a management headache because it means allocating a new IP address for every application and mapping addresses to apps with your DNS provider. Getting traffic to the right app is a routing problem and you can manage it inside Kubernetes instead, using ingress. Ingress uses a set of rules to map domain names and request paths to applications, so you can have a single IP address for your whole cluster and route all traffic internally.
Routing by domain name is an old problem which has usually been solved with a reverse proxy, and Kubernetes uses a pluggable architecture for ingress - you define the routing rules as standard resources and you deploy your choice of reverse proxy to receive traffic and act on the rules. All the major reverse proxies have Kubernetes support, along with a new species of container-aware reverse proxy. They all have different capabilities and working models, and in this chapter you'll learn how you can use ingress to host multiple apps in your cluster with two of the most popular: Nginx and Traefik.