What is Ingress:-
Ingress: This service allows the routing of HTTP(S) traffic
according to defined rules like path-based routings. This can be associated
with one or more service objects where these services are further associated
with Pods. The ingress controller creates HTTP(S) load balancer Layer 7 load
balancer which is configured automatically using the definition in the Ingress
object.
There are two sub-components when we discuss about Ingress:
●
Ingress Controllers
●
Ingress Resource
Ingress Controller: For an Ingress to function, an
Ingress Controller must be deployed in the cluster. It is the actual
implementation that watches for Ingress resources and configures the necessary
routing.
The Ingress Controller takes care of the Layer 7
proxy to implement ingress rules like a brain.
Examples of Ingress Controllers:
1.NGINX Ingress Controller.
2.HAProxy Ingress Controller.
3.Traefik.
4.AWS ALB Ingress Controller (for AWS).
5.Istio Ingress Controller.
6.Apache APISIX Ingress Controller.
Ingress Resource contains set of routing rules based
on which traffic is routed to a service.
An Ingress Resource in Kubernetes is an API object
that defines rules for routing external HTTP and HTTPS traffic to services
within the cluster. It's a declarative way to manage how clients access your
services, such as routing based on URL paths, domains, or subdomains.
We will Create an ingress Resource. Routing rules are created in ingress Resources.
Ingress flow
Ingress can provide various features which include:
Key Features of Ingress:
Path-Based Routing: Direct traffic to specific
services based on the request path.
Example: /API to Service A, /web to Service B.
Host-Based Routing: Route traffic based on the host
or domain name.
Example: example.com to Service A, api.example.com to
Service B.
TLS/SSL Termination: Handle secure HTTPS connections,
often offloading the burden of SSL encryption from backend services.
Load Balancing: Distribute traffic among multiple
instances of a service.
Custom Rules: Use annotations or custom
configurations to extend functionality (e.g., adding authentication or rate
limiting).
1. Path-Based Routing:
2. Host-Based
Routing:
3.TLS/SSL Termination: