ingress2gateway - convert Ingress manifests to Gateway API manifests
ingress2gateway print --providers=ingress-nginx [-n NS | -A | --input-file F[,F]] [-o yaml|json]
Options you will use
--providers=ingress-nginx- which controller's annotations to translate (required)
-n, --namespace NS / -A, --all-namespaces- read the Ingresses from the cluster
--input-file a.yaml,b.yaml- read them from files instead
--emitter envoy-gateway|kgateway|agentgateway- add implementation-specific extensions for what Gateway API has no field for
--ingress-nginx-ingress-class nginx- which Ingress class counts as ingress-nginx
--providers LIST- Which controllers' Ingresses and annotations to translate, e.g. ingress-nginx (required).
-n, --namespace NS- The namespace (default: the kubeconfig context's).
-A, --all-namespaces- Read Ingresses from every namespace.
--input-file FILES- Read Ingresses from these files instead of the cluster (comma separated).
-o, --output FORMAT- yaml (default) or json.
--emitter NAME- Add implementation extensions for what Gateway API has no field for (envoy-gateway, kgateway, agentgateway).
--ingress-nginx-ingress-class NAME- The Ingress class that counts as ingress-nginx.
--kubeconfig FILE- The kubeconfig to use.
Examples
$ ingress2gateway print --providers=ingress-nginx -n shop > gwapi.yamlone Gateway per class, one HTTPRoute per host, warnings on stderr
$ ingress2gateway print --providers=ingress-nginx --input-file ingress.yamloffline, from a file
Gotchas
- Path rewrites with capture groups ($1, $2) have no Gateway API equivalent: URLRewrite only replaces a prefix or the full path.
Taught in
Try ingress2gateway in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.