The ๐๐ด๐ ๐๐ป๐ด๐ฟ๐ฒ๐๐ has been one of (if not the) major ways of exposing applications running in a Kubernetes cluster to external traffic. Other options include ๐ก๐ผ๐ฑ๐ฒ๐ฃ๐ผ๐ฟ๐, ๐๐ผ๐ฎ๐ฑ๐๐ฎ๐น๐ฎ๐ป๐ฐ๐ฒ๐ฟ, or using a ๐๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ ๐บ๐ฒ๐๐ต. But Ingress still comes out on top and remains one of the most widely adopted ways to expose applications.
That said, Ingress has plenty of limitations that make it tricky to manage. Letโs break it down:
In a typical Ingress resource, the ๐๐ฝ๐ฒ๐ฐ section is where you configure your host, route to the backend service, and the service itself. Thatโs pretty much it. But to make an Ingress ๐ฅ๐ง๐ค๐๐ช๐๐ฉ๐๐ค๐ฃ-๐ง๐๐๐๐ฎ, we usually need more: ๐๐ฟ๐ฎ๐ณ๐ณ๐ถ๐ฐ ๐๐ฝ๐น๐ถ๐๐๐ถ๐ป๐ด, ๐ง๐๐ฆ ๐ฐ๐น๐ถ๐ฒ๐ป๐ ๐ฎ๐๐๐ต๐ฒ๐ป๐๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป, ๐ฟ๐ฎ๐๐ฒ ๐น๐ถ๐บ๐ถ๐๐ถ๐ป๐ด, ๐๐ข๐ฅ๐ฆ, ๐ต๐ฒ๐ฎ๐ฑ๐ฒ๐ฟ ๐บ๐ฎ๐ป๐ถ๐ฝ๐๐น๐ฎ๐๐ถ๐ผ๐ป, and so on. These canโt be handled in the spec directly.
The workaround? ๐๐ป๐ป๐ผ๐๐ฎ๐๐ถ๐ผ๐ป๐.
The problem? Annotations are specific to the ๐ถ๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐๐ฎ๐๐ถ๐ผ๐ป (๐ก๐๐๐ก๐ซ, ๐ง๐ฟ๐ฎ๐ฒ๐ณ๐ถ๐ธ, ๐๐ผ๐ป๐ด, ๐ฒ๐๐ฐ.). This becomes a mess if you ever want to migrate to a different Ingress controller, because you basically have to rewrite everything.
This is where the ๐๐ฎ๐๐ฒ๐๐ฎ๐ ๐๐ฃ๐ comes in.
With Gateway API, everything is ๐๐๐ฎ๐ป๐ฑ๐ฎ๐ฟ๐ฑ๐ถ๐๐ฒ๐ฑ from traffic routing to rate limiting to advanced policies. And the best part: itโs the same across implementations. So an ๐ป๐ด๐ถ๐ป๐ -๐ด๐ฎ๐๐ฒ๐๐ฎ๐-๐ณ๐ฎ๐ฏ๐ฟ๐ถ๐ฐ setup would work with ๐ง๐ฟ๐ฎ๐ฒ๐ณ๐ถ๐ธ without needing to change annotations.
๐๐ผ๐ฟ๐ฒ ๐๐ผ๐บ๐ฝ๐ผ๐ป๐ฒ๐ป๐๐ ๐ผ๐ณ ๐๐ฎ๐๐ฒ๐๐ฎ๐ ๐๐ฃ๐:
1๏ธโฃ ๐๐ฎ๐๐ฒ๐๐ฎ๐๐๐น๐ฎ๐๐ โ Points to the implementation (e.g., Istio, NGINX Gateway Fabric, HAProxy Ingress).
2๏ธโฃ ๐๐ฎ๐๐ฒ๐๐ฎ๐ โ Refers to the endpoint that processes traffic (e.g., filtering, routing, load balancing). This could be a cloud load balancer, proxy, or a server with LB installed.
3๏ธโฃ ๐ฅ๐ผ๐๐๐ฒ๐ โ Define how traffic flows from the Gateway endpoint to backend services, which then forward to the pods.
This is just a high-level overview. In my upcoming posts, Iโll share how to migrate from Ingress to Gateway API.
๐ Consider a repost if you found this useful.
Useful links:
Top comments (0)