|
| 1 | +--- |
| 2 | +title: Ingress |
| 3 | +status: Feedback Appreciated |
| 4 | +category: technology |
| 5 | +tags: ["fundamental", "", ""] |
| 6 | +--- |
| 7 | + |
| 8 | +An Ingress is a set of rules that helps to manage internet traffic from outside into a container or a group of containers running in a cluster. |
| 9 | +It consists of two elements: the ingress resource and the ingress controller. |
| 10 | +The ingress resource is a configuration file that lives along with other manifest files and allows admins to configure the external traffic routing. |
| 11 | +The ingress controller is the web server technology that actually performs the routing of the traffic according to the configuration in the ingress resource. |
| 12 | + |
| 13 | +## Problem it addresses |
| 14 | + |
| 15 | +Cloud Native web applications consist of multiple services, and often, those [services](/service/) need to be accessible over the internet for users to visit using their browser. |
| 16 | +To make these services user accessible while using [Kubernetes](/kubernetes/) to run this application, we need to expose each application service to the outside world. |
| 17 | +The most straightforward way would be to use a Kubernetes Load Balancer Service. |
| 18 | +Creating such a Kubernetes Load Balancer Service results in a new component on the underlying infrastructure. |
| 19 | +This not only introduces new costs and management overhead, but each newly created Load Balancer has its own external IP address. |
| 20 | +This leads to a bad user experience, because as a user, we don’t want to browse different URLs to access an application. |
| 21 | + |
| 22 | +## How it helps |
| 23 | + |
| 24 | +An Ingress resource allows you to configure how traffic is balanced and routed to an application’s services. |
| 25 | +The ingress controller is a web server that allows for a single entry point through a URL (www.example-url.com) and does the actual routing and balancing based on different URL paths (www.example-url.com/path). |
| 26 | +An Ingress controller is a component that runs within the cluster and interprets the rules defined in the Ingress resource. |
| 27 | +It is up to the cluster operators where the web app runs to choose a specific Ingress controller from a set of possible technologies like Nginx, Traefik, HAProxy, etc. |
| 28 | +So now, if an application consists of multiple services, the user can access it using a single URL. |
| 29 | +This eliminates the need for numerous separate load balancers on the infrastructure level and eases the configuration of firewall and load balancer rules for each service. |
| 30 | +By centralizing traffic routing and handling configurations, Ingress provides streamlined scalability, optimizes resource utilization, reduces costs, and improves overall manageability for applications running in a cluster. |
0 commit comments