The Kubernetes Gateway API (also known simply as the "Gateway API") enables smarter traffic management across individual Kubernetes (K8s) clusters (and across distributed, multi-cloud clusters in our implementation) through a K8s-native API standard. Gateway API helps simplify the process of routing external application traffic to services within Kubernetes clusters while integrating seamlessly with K8s' native resource types. It's configurable using the standard YAML formatting shared by other K8s components.
Building on the Ingress API with extended features, Kubernetes Gateway API powers Layer 4 and Layer 7 load balancing within Kubernetes while helping enable other functionality, such as canary testing, service mesh, and service discovery. It also overcomes some of Ingress API's limitations by offering UDP, TCP, WebSockets, and gRPC support — instead of restricting compatible applications to HTTP and HTTPS.
Flexibility is therefore a major value driver for Gateway API, and continues to be a key developmental focus. Gateway API replaces the Ingress standard that's been generally available since 2020, and was unveiled in 2023 as the API standard for the foreseeable future. The SIG-Network group created and maintains the Kubernetes Gateway API, which currently sits at v1.4.0. The project is open source and freely available to all users.
How does the Kubernetes Gateway API work?
Gateway API works by giving Kubernetes users more advanced (and granular) routing, service discovery, and service mesh capabilities versus its predecessor. It foregoes the limitations of basic routing by offering weighted traffic splitting, service-specific routing rules, and other routing configurations based on internet protocol. It also allows users to define their own custom resources to supplement those already available in Kubernetes — paving the way for new features.
The API standard relies on three primary components to function:
Gateway – This acts as the entry point for your Kubernetes cluster and routes traffic to the preconfigured destination, such as a service running within a pod. It determines how listeners behave and which traffic they monitor for, while serving multiple applications simultaneously as configured.
GatewayClass – Acting as a template, this helps group similar Gateways together based on their shared configurations, while controllers enforce class specifications. This defines which controllers will manage respective Gateways while controlling how resources are allocated.
HTTPRoute – Similar to TCPRoute and GRPCRoute resources, this defines how HTTP traffic is routed to backend services according to protocol header, URL path information, and more. This allows users to create and enforce traffic routing rules while encouraging collaboration, by preventing potential routing conflicts between teams.
Then there's the controller, which we've mentioned briefly. The Gateway API controller centrally manages resources across Gateways while sanity checking configurations to guard against unexpected issues — typically introduced through human error (after all, Kubernetes is often complex and hard to master).
The controller also continuously monitors for any changes across the API's core components and pushes new configurations reactively to ensure your clusters are updated successfully. Control loops throughout Kubernetes make this happen and can offer context clues. For example, the controller itself isn't responsible for analyzing the environment periodically, but instead gathers information before determining if action is needed.
Users can also update their respective Gateway API version independently of the Kubernetes version they're actively using. This means less disruption and lets teams innovate without regularly introducing pesky, breaking changes.
What are the benefits of Kubernetes Gateway API?
When compared to Ingress API, Kubernetes Gateway API brings plenty of improvements to Kubernetes deployments:
Gateway API is more flexible and offers more robust, modern protocol support. This unlocks many more use cases vs. Ingress API.
Gateway API is easier to manage while offering granular control for those who need it, making K8s both more approachable for novices and more capable for power users.
Gateway API is truly cloud-native and supports Kubernetes deployments distributed across clouds.
Gateway API is relatively future-proof thanks to its support for extensible resources and evolving technologies.
Gateway API is designed with humans in mind, and thus is meant to be both user-friendly and readily configurable without a steep learning curve (for experienced users). It's also expressive thanks to native annotation support.
Gateway API is considered role-oriented and fits naturally in organizations where granular administrative control is desirable (for security, compliance, and error-proofing).
However, Gateway API isn't perfect. It represents an evolution that gets us closer to simpler traffic management in Kubernetes, newcomers to K8s might find the standard challenging to grasp since it's no longer limited to single-resource Ingress. Migration might be challenging depending on deployment complexity, as well, though this isn't a universal drawback.
You’ve mastered one topic, but why stop there?
Our blog delivers the expert insights, industry analysis, and helpful tips you need to build resilient, high-performance services.
Does HAProxy support Kubernetes Gateway API?
Yes! HAProxy One now includes our HAProxy Unified Gateway (HUG) beta, which enables unified, high-performance, cloud-native application routing, backed by an open source community with 20+ years of experience, and with a seamless upgrade path to an enterprise platform providing secure, centralized, multi-cloud connectivity and traffic management.
HUG provides a free open-source solution for cloud-native application routing, featuring unified integration with the latest Kubernetes Gateway API and (coming next year) the existing Ingress API, all built on HAProxy’s legendary performance, reliability, and flexibility — so you can trust it to operate dependably at the largest scale.
To learn more about Kubernetes Gateway API support in HAProxy, check out our HAProxy Unified Gateway announcement blog.