Introducing Ingress2Gateway 1.0: Transitioning to Gateway API
Mar 20, 2026
850 views
Kubernetes Networking at a Crossroads
Kubernetes is on the cusp of a significant transition, particularly with the impending retirement of Ingress-NGINX in March 2026. For the majority of organizations, the pressing question isn’t whether they should transition to the Gateway API — it’s about how to do it effectively and with minimal disruption. This migration represents not just an operational shift but a fundamental rethinking of how APIs are designed and managed. Switching from the Ingress API to the Gateway API isn't trivial. Gateway API introduces a more modular architecture that supports increased extensibility and robust Kubernetes-native RBAC capabilities. By contrast, Ingress API relies on a simpler structure, with implementations like Ingress-NGINX extending functionality through various annotations, ConfigMaps, and Custom Resource Definitions (CRDs). The challenge lies in capturing the intricate behavior of Ingress-NGINX and translating those nuances to the new framework offered by Gateway API. To facilitate smoother migrations, a tool called Ingress2Gateway has been introduced, assisting teams in this complex transition. It translates existing Ingress resources and their specific annotations to the Gateway API, all while alerting users to any configuration elements that can't be automatically translated and suggesting alternatives.Ingress2Gateway 1.0 Launch
A significant milestone in this migration aid has just been reached with the announcement of Ingress2Gateway 1.0. This version provides a stable, tested solution for teams eager to modernize their networking frameworks.Improved Annotation Support
One of the standout enhancements in the 1.0 update is its expanded support for Ingress-NGINX annotations. Previously, Ingress2Gateway could only handle three annotations; now, it accommodates over 30 common ones. This thorough support includes annotations crucial for functionalities like CORS, backend TLS, regex matching, and path rewriting — features that are often critical for proper service operation.Robust Testing Mechanism
Another critical feature of Ingress2Gateway 1.0 is its comprehensive integration testing. Each supported annotation, along with various typical combinations, is backed by controller-level integration tests. These tests ensure the configuration's behavior matches that of the original Ingress-NGINX setup, confirming proper functionality in real cluster environments. They don’t just check whether YAML is structured correctly; they evaluate behaviors like routing, redirects, and rewrites, catching potential issues before they reach production. The testing process involves spinning up an Ingress-NGINX controller and multiple Gateway API controllers, applying Ingress resources, and then validating that the behavior of both systems aligns. This process is crucial for identifying and addressing those unexpected edge cases that might otherwise lead to production issues.Enhanced Error Notifications
Migration surely involves complexities, and hence is not a "one-click" operation. Ingress2Gateway 1.0 places importance not solely on what can be migrated, but also on surfacing the subtleties that can complicate the process. The tool has improved notification clarity, detailing what configurations may be unsupported and how to address these gaps effectively, providing actionable insights instead of vague alerts.How to Utilize Ingress2Gateway
Ingress2Gateway is designed to be a comprehensive migration helper rather than a simple drop-in replacement. Its functionalities include:- Translating supported Ingress configurations to the Gateway API
- Identifying unsupported configurations and offering alternative suggestions
- Encouraging a reevaluation of configurations that may no longer be desirable
1. Installing Ingress2Gateway
If you have a Go development environment ready, Ingress2Gateway can be quickly installed using:go install github.com/kubernetes-sigs/ingress2gateway@v1.0.0
brew install ingress2gateway
2. Running Ingress2Gateway
Once installed, Ingress2Gateway can be run with standard Ingress manifests or can read manifests directly from the Kubernetes cluster. Here’s how you can pass it specific files or opt for cluster-wide translations.# Pass it files
ingress2gateway print --input-file my-manifest.yaml,my-other-manifest.yaml --providers=ingress-nginx > gwapi.yaml
# Use a namespace in your cluster
ingress2gateway print --namespace my-api --providers=ingress-nginx > gwapi.yaml
# Or your whole cluster
ingress2gateway print --providers=ingress-nginx --all-namespaces > gwapi.yaml
Note:
You can also pass--emitter <agentgateway|envoy-gateway|kgateway> to output implementation-specific extensions.3. Review the Output
This step is perhaps the most critical. The commands from the previous section will output a Gateway API manifest into a file namedgwapi.yaml, along with warnings that clarify any translations that did not go as planned. Reviewing this output ensures you catch any discrepancies before deploying changes in your environment.Annotation Translation: Successes and Shortcomings
The translation from Ingress annotations to Gateway API equivalents isn’t without its successes. For instance, the handling of CORS has been straightforward; the annotationnginx.ingress.kubernetes.io/enable-cors translates neatly into a CORS filter within the Gateway API. This implementation offers a clear benefit, enhancing consistency in how cross-origin requests are handled across various services.
However, the process isn't flawless. A closer examination reveals some crucial discrepancies, particularly with annotations like nginx.ingress.kubernetes.io/proxy-{read,send}-timeout and nginx.ingress.kubernetes.io/proxy-body-size. These do not have direct counterparts in the Gateway API, which raises a significant concern. It's not entirely clear why these omissions occurred; they seem critical for maintaining expected behavior in legacy configurations.
The logs provide insight into the translation process, detailing not only what was translated but also some reasoning behind why certain annotations were left out. But reliance on logs for clarity here suggests that users migrating to the new Gateway API may encounter unforeseen hurdles, undermining the straightforwardness touted by the transition.
What this means for teams working within Kubernetes is that while some improvements are apparent, planning around these undefined behaviors and limitations will be necessary. You'll want to ensure your configurations are not just translated, but functional. The apparent shortcomings should inform how developers approach their migration strategies to avoid service disruptions.