Limitations of Ingress
Consider the basic Ingress configuration below, which routes traffic based on host names:Because each controller implements its own set of annotations, these configurations are tightly coupled to specific controllers and cannot be validated by Kubernetes itself.
Introducing the Gateway API
The Gateway API was created as an official Kubernetes project to overcome the limitations of Ingress. It supports both layer 4 (transport) and layer 7 (application) routing, representing the next generation of load balancing and service mesh APIs. By decoupling responsibilities, the Gateway API introduces three distinct objects:- Gateway Class: Configured by infrastructure providers to define the underlying network infrastructure (e.g., NGINX, Traefik, or other load balancers).
- Gateway: Managed by cluster operators; these are instances built from a Gateway Class.
- HTTPRoute (and other route types): Managed by application developers; these routes support various protocols such as HTTP, TCP, and gRPC.
Gateway API Configuration Example
The following example illustrates how to define a Gateway Class, a Gateway, and an HTTPRoute using the Gateway API:TLS Configuration with Gateway API
Traditional Ingress configurations handle TLS by using thespec.tls section, often accompanied by additional annotations to enforce HTTPS redirection. Consider the following Ingress example for a secure application:
allowedRoutes field ensures that only HTTPRoute objects can attach to the listener.
Traffic Splitting and Canary Deployments
Ingress relies on annotations for complex use cases like canary deployments. For example, you might use NGINX annotations to route 20% of the traffic to a new application version:Centralized Advanced Configuration
For features like Cross-Origin Resource Sharing (CORS), the Gateway API centralizes configurations without relying on controller-specific annotations. Consider the following Gateway API-based CORS configuration:Gateway API Controller Support
A range of major controllers now support, or are actively implementing, the Gateway API. This industry support includes platforms such as Amazon EKS, Azure Application Gateway for Containers, Contour, Envoy, Google Kubernetes Engine, HAProxy, Istio, Kong, Kuma, NGINX, and many others. Such broad adoption underlines the growing momentum and reliability of the Gateway API.

Conclusion
The Gateway API overcomes the limitations of Ingress by providing a more declarative, structured, and multi-protocol solution for traffic management. By segregating responsibilities among GatewayClass, Gateway, and HTTPRoute, it simplifies multi-tenant management and advanced routing scenarios such as TLS termination, traffic splitting, and CORS configuration.For a deeper understanding of these concepts, try practicing with hands-on labs to experiment with different Gateway API configurations.