ingress2gateway: what it converts and what it leaves to you
ingress2gateway converts Ingresses and over thirty ingress-nginx annotations to the Gateway API. What it carries well, what it drops (snippets, auth), and how to review its output as a first draft.
ON THIS PAGE
Run ingress2gateway on every cluster that still has Ingresses, and treat what it prints as a first draft. Its warnings are the inventory you would otherwise build by hand, and its YAML reproduces ingress-nginx faithfully: the quirks you never knew you depended on, and the ownership you had before. The review is the migration. Deciding which of those quirks to keep, and who should own the Gateway it creates, is work the tool deliberately leaves to you.
Based on the article from Gazeek, our sister site for hands-on CKA and CKAD labs: ingress-nginx is retired: your options. The inventory commands, the other two ways out and the references are there; this page is about the converter.
What it is#
A SIG Network command-line tool that reads Ingress resources, plus the annotations or custom resources of the controller behind them, and prints Gateway API resources. Version 1.0 arrived in March 2026, the month ingress-nginx was retired. It reads either the live cluster or files you pass with --input-file, and it only ever writes to standard output. It never applies anything.
ingress2gateway print --providers=ingress-nginx --all-namespaces > gateway-api.yaml
ingress2gateway print --providers=ingress-nginx --input-file=ingresses.yaml > from-git.yamlPick the provider carefully. ingress-nginx is the retired community controller; nginx is F5's NGINX Ingress Controller, a different product with different annotations. Choosing the wrong one gives you a clean-looking run that ignores most of your configuration.
Running it both ways is worth the extra minute. If the warnings from your git manifests and from the live cluster differ, someone has changed an Ingress by hand, and you would rather learn that now than on cut-over day.
What it converts well#
Before 1.0 the tool understood only a handful of ingress-nginx annotations, all of them for canary routing. Release 1.0 raised that to more than thirty, and added integration tests that run an ingress-nginx controller and Gateway API controllers and check that they behave the same way (routing, redirects, rewrites) rather than only comparing the shape of the YAML. The covered set is the everyday one: TLS and the HTTP-to-HTTPS redirect, permanent and temporary redirects, rewrites without capture groups, CORS, header and weight canaries, source IP allow and deny lists, gRPC backends, backend TLS, and, in later releases, SSL passthrough as a TLSRoute and the app-root redirect.
Where the standard API has no field, an emitter can help. --emitter envoy-gateway, kgateway or agentgateway adds that implementation's own resources for things such as body size limits. That output is no longer portable, so use it only if you have already chosen that implementation.
What it leaves to you#
- Snippets.
configuration-snippetis reported and dropped. There is no standard equivalent; each one needs redesigning against your implementation's policies. - Authentication annotations.
auth-urland basic auth are not on the supported list. They show up only as unsupported-annotation warnings, and a host that relied on them converts into a route that is open. - Recognised but not converted: cookie canaries, header-pattern canaries,
custom-headers, proxy redirects, and TLS protocol and verify-depth settings. Each gets a warning. - Rewrites with
$1. Capture-group rewrites are flagged rather than translated. - Body size has no standard field, and URL normalisation is not configurable in the standard API at all. Both depend on the implementation's defaults, so test them.
The authentication gap is the one to check first. Every other omission tends to break a request; this one quietly allows requests that used to be refused.
Reviewing the draft#
The output is a careful imitation of ingress-nginx, and some of what it imitates you will not want. In the release announcement's own example, a regex path became a case-insensitive prefix match, because that is what ingress-nginx did; read every RegularExpression match and decide. Its TCP-level timeouts became a best-effort request timeout: set the number yourself. A port 80 listener and a 308 redirect route were added to copy the old default; delete them if you serve only HTTPS.
spec:
gatewayClassName: nginx # your old IngressClass, not a GatewayClass you have
---
matches:
- path:
type: RegularExpression
value: (?i)/users/(\d+).* # case-insensitive and open-ended, as ingress-nginx wasThen the structural question. The generated Gateway takes its class name from your old IngressClass, so it points at a GatewayClass that probably does not exist, and in that example it sits in the app's namespace with the app's certificate. That is the Ingress ownership model written in new syntax. If you are moving for the split between platform and app teams, described in the Gateway API for people who know Ingress, merge the generated Gateways into a shared one owned by the platform team and repoint each route's parentRefs. The tool cannot make that decision for you, and should not.
After that, run the result beside ingress-nginx and move hosts across one at a time, as in ingress-nginx is retired: what now?. Canary annotations arrive as weights, which blue/green with the Gateway API puts to work.
The diagram#
An Ingress with its annotations goes into ingress2gateway; out come a Gateway and HTTPRoute, a list of warnings, and the review that turns them into something you would deploy. Open it in archhy and press Make a copy to adapt it.
Go deeper#
Gazeek's full article has the commands that count your annotations, the conversion command, the Traefik and cloud alternatives and links to every announcement.
