1. Why Gateway API Migration from Ingress NGINX Cannot Wait

Gateway API migration from Ingress NGINX cannot wait because the ingress-nginx controller reached end of life in March 2026: the repository is read-only and no further security patches ship. Your existing Ingresses still run, but every new CVE in the edge data plane now lands on your team. Migration removes that unpatched exposure.

Consider an illustrative composite incident. A platform team postpones migration because traffic is healthy. Months later a critical ingress vulnerability is disclosed, the fix exists only in maintained controllers, and the team must migrate under incident pressure with no parallel-run window, no converted routes, and no rehearsed rollback. The outage risk in that story is not the vulnerability alone. It is the rushed cutover.

Separate two facts that teams often merge. The Ingress API itself is frozen but still supported, so another Ingress controller could keep your Ingress resources working. The ingress-nginx controller is the retired component. Gateway API is the designated successor, and it fixes the root cause that made ingress-nginx hard to maintain: behaviour hidden in annotations and raw NGINX snippets. A migration plan therefore has two goals. Remove the unpatched controller, and move routing behaviour into typed fields that the API server can validate.

Start the clock honestly. Inventory how many Ingresses, hostnames, and annotation types you run before promising a date. A cluster with twelve plain Ingresses migrates in days. A cluster with regex rewrites, canary annotations, external auth, and configuration snippets migrates in weeks. The inventory in the next sections turns that estimate into a list of named work items. For the underlying resource model, read the Gateway API tutorial on GatewayClass, Gateway, and HTTPRoute before converting anything.

Set an internal deadline even if no external date forces one. The risk compounds quietly: every month on an unpatched edge widens the window where a disclosed vulnerability has no vendor fix, and every new Ingress added during that window increases the conversion backlog. Freeze new ingress-nginx annotations once migration starts, and require new routes to land as HTTPRoutes on the new gateway. That freeze stops the backlog growing while the team works through it.


2. How Gateway API Migration from Ingress NGINX Changes Ownership

Gateway API migration from Ingress NGINX changes ownership by splitting one Ingress object into three roles. Infrastructure teams own the GatewayClass, cluster operators own the Gateway with its listeners and TLS, and application teams own HTTPRoutes that attach through parentRefs. That split is the main design gain over annotation-driven Ingress.

In ingress-nginx, one Ingress plus annotations controlled hostname routing, TLS, rewrites, timeouts, CORS, and sometimes raw NGINX configuration. Anyone who could edit an Ingress could influence the shared data plane, and the configuration-snippet annotation let Ingress authors inject arbitrary NGINX config. That flexibility was useful and dangerous in the same object.

Gateway API replaces that single object with a role-oriented model. The GatewayClass names the controller implementation, for example Envoy Gateway or NGINX Gateway Fabric. The Gateway declares listeners: ports, protocols, hostnames, TLS certificate references, and which namespaces may attach routes. The HTTPRoute declares matches, filters, and backendRefs, and it attaches to a Gateway through parentRefs. A route in an application namespace cannot change the listener, the certificate, or another team's route.

This ownership split changes your migration work. Platform teams design one or two Gateways per cluster, usually public and internal, with allowedRoutes namespaces set deliberately. Application teams then migrate their own HTTPRoutes without holding gateway credentials. Review the tradeoffs in Ingress vs Gateway API vs Service Mesh if your team still debates whether the edge should also be a mesh. For most migrations, keep the edge decision separate: pick a Gateway API controller for north-south traffic first, and treat east-west mesh policy as a later decision.

Use the ownership split in code review. Gateway and GatewayClass changes go through platform review with listener and TLS impact stated. HTTPRoute changes go through application review with path and backend impact stated. That separation prevents the old failure mode where a routine application deploy silently altered shared edge behaviour. It also makes audit questions answerable: who changed the listener, who changed the route, and which change introduced a given behaviour.


3. Gateway API Migration from Ingress NGINX Starts with Inventory

Gateway API migration from Ingress NGINX starts with a full inventory of Ingresses, classes, annotations, hostnames, TLS secrets, and ConfigMap settings. Count annotation types across all namespaces, flag snippets and regex paths, and record which routes carry canary or auth behaviour. That inventory becomes the migration backlog.

Run the inventory before installing anything. List Ingresses in every namespace, note ingressClassName values including the legacy kubernetes.io/ingress.class annotation, and extract every nginx.ingress.kubernetes.io annotation key with a count. The long tail matters more than the total: one configuration-snippet on a payment route can outweigh fifty plain host rules.

bash
kubectl get ingress -A -o wide
kubectl get ingress -A -o json | jq -r '.items[].metadata.annotations // {} | keys[]' | sort | uniq -c | sort -nr
kubectl get ingress -A -o json | jq -r '.items[] | select(.spec.tls) | .metadata.namespace + "/" + .metadata.name'
kubectl -n ingress-nginx get configmap ingress-nginx-controller -o yaml

Record four outputs. First, the hostname and TLS map: which certificates terminate where, and whether cert-manager issues them. Second, the annotation histogram: rewrites, CORS, timeouts, body size, rate limits, canary weights, external auth, allowlists. Third, the special cases: regex paths, capture-group rewrites, snippet annotations, TCP or UDP services exposed through the controller ConfigMap. Fourth, the traffic baseline: request rate, p95 latency, and error rate per hostname from your current metrics. You will compare the new gateway against that baseline during parallel running, so capture it while the old system is healthy. If service endpoints look wrong during inventory, the Kubernetes Services guide explains how backends resolve behind an Ingress.

Export the inventory into the migration repository, not a chat message. The annotation histogram, hostname map, and special-case list become the checklist reviewers sign off against. When a converted route behaves differently, the inventory tells you whether the old behaviour was deliberate or accidental. Accidental behaviour still needs a decision, because clients may depend on it, but the decision becomes explicit instead of discovered during an incident.


4. Choosing a Controller for Gateway API Migration from Ingress NGINX

Choosing a controller for Gateway API migration from Ingress NGINX depends on the behaviour your inventory found, not on brand familiarity. Envoy Gateway suits Envoy-standardised teams, NGINX Gateway Fabric feels closest to NGINX habits, and Istio or Cilium fit clusters already running them. Test your hardest route first.

Gateway API is a specification. The controller you install decides which filters, policy CRDs, and observability hooks you actually get. Shortlist from your annotation histogram. If you need header manipulation from Secrets, weighted canary, request mirroring, or inference-aware routing, verify those features in the candidate controller before converting hundreds of routes.

Run a proof of concept with the hardest route in the inventory, not the easiest. Take the Ingress with a regex rewrite, a timeout, and CORS, convert it, and serve real test traffic through the candidate. Teams repeatedly discover their controller constraint at this point: a missing filter, a policy that cannot inject a header from a Secret, or TLS behaviour that differs from NGINX. Finding that in a proof of concept costs an afternoon. Finding it during cutover costs an incident.

Check three operational properties as well. Confirm the controller exposes per-route metrics and access logs you can alert on. Confirm its upgrade cadence and security advisory process, since the reason you are migrating is an unmaintained edge. Confirm it runs on your Kubernetes version and cloud load balancer without special pleading. Then write the decision down with the rejected alternatives, so the next engineer does not reopen the choice mid-migration.

Score controllers against your inventory rows, one row at a time. For each annotation type, record whether the candidate supports it natively, through a policy CRD, or not at all. A controller that handles ninety percent of rows natively and the rest through policies beats a controller that handles everything through proprietary extensions you cannot port later. Keep the scoring sheet; it becomes the evidence behind the choice when teams question it mid-migration.


5. Gateway API Migration from Ingress NGINX with ingress2gateway

Gateway API migration from Ingress NGINX with ingress2gateway converts Ingress resources into Gateway and HTTPRoute YAML and warns about behaviour it cannot translate. The 1.0 release covers more than thirty ingress-nginx annotations, including CORS, rewrites, and backend TLS. Treat every warning as a tracked work item.

ingress2gateway is the SIG Network conversion tool. It reads Ingress resources from a cluster or files and prints Gateway API resources. Use the ingress-nginx provider, capture stderr separately, and keep the warnings file under version control next to the output.

bash
ingress2gateway print --providers=ingress-nginx --all-namespaces > gwapi.yaml 2> warnings.txt
ingress2gateway print --providers=ingress-nginx -n shop > shop-gwapi.yaml 2> shop-warnings.txt

Read the output as a draft, not a finished migration. The converter handles structure and common annotations, and its behaviour tests compare runtime routing against real controllers. It cannot invent equivalents for NGINX-only behaviour. Configuration snippets, some body-size limits, and URL normalisation details need manual decisions: a controller policy CRD, an application change, or an accepted behaviour difference with an owner.

Convert one namespace first, apply it to a test cluster or a parallel gateway, and send the same requests to old and new paths. Compare status codes, redirect locations, rewritten paths, response headers, and CORS preflight answers. Only then convert the next namespace. Bulk-converting the whole cluster into one unreviewed file is how subtle path differences reach production.

Save the converter version with the output. ingress2gateway behaviour changes between releases, and a route converted in January should be reproducible in June. Record the version, the exact command, and the warnings file hash in the migration repository. When a later release improves annotation coverage, reconvert the remaining namespaces and diff the output instead of hand-editing converted YAML. Reproducibility turns conversion from an event into a process.


6. Rewriting Routes in Gateway API Migration from Ingress NGINX

Rewriting routes in Gateway API migration from Ingress NGINX means translating rewrite-target annotations into HTTPRoute URLRewrite filters and checking regex semantics by hand. PathPrefix matches and capture-group rewrites behave differently across controllers, so test each rewritten path with real requests before cutover.

The most common silent breakage is the rewrite. ingress-nginx rewrite-target with capture groups, for example /old(/|$)(.*) rewriting to /new/$2, has no automatic equivalent in every controller. Gateway API offers URLRewrite with ReplacePrefixMatch for prefix replacement, and RegularExpression path matches where the implementation supports them. The converter flags case-insensitive regex and capture-group cases; those flags are your manual review list.

yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: shop
  namespace: shop
spec:
  parentRefs:
    - name: public-gateway
      namespace: gateway-system
      sectionName: https
  hostnames:
    - shop.example.com
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /api
      filters:
        - type: URLRewrite
          urlRewrite:
            path:
              type: ReplacePrefixMatch
              replacePrefixMatch: /v2
      backendRefs:
        - name: shop-api
          port: 8080

Verify three things per rewritten route. The backend receives the path it expects, including trailing-slash cases. Redirects generated by the application still point at public paths, not internal ones. Encoded characters and dot segments behave the same way, because NGINX normalisation and Envoy normalisation differ. Add each case to a curl-based regression script you can rerun after every controller upgrade. Path bugs are cheap to catch with a script and expensive to catch from customer reports.

Test rewrites with the clients that actually call the route, not only with curl. Mobile apps, partner integrations, and webhook senders often depend on redirect behaviour, trailing slashes, or encoded paths that a manual test misses. Pull the top user agents and paths from access logs for each rewritten route and add those exact requests to the regression script. Real traffic shapes catch the cases synthetic tests forget.


7. TLS and Certificates in Gateway API Migration from Ingress NGINX

TLS and certificates in Gateway API migration from Ingress NGINX move from per-Ingress tls blocks to Gateway listeners that reference Secrets, with cert-manager issuing certificates for Gateway resources. Plan SNI hostname coverage, HTTP to HTTPS redirects, and backend TLS separately, then test each hostname against the new listener.

In the Gateway model, TLS termination lives on the Gateway listener. One listener can serve many hostnames when the certificate covers them, or you can use one listener per hostname group with its own certificateRef. cert-manager supports Gateway API listeners, so keep your existing issuers and let cert-manager manage the Secrets the Gateway references.

yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: public-gateway
  namespace: gateway-system
spec:
  gatewayClassName: eg
  listeners:
    - name: https
      port: 443
      protocol: HTTPS
      hostname: "*.example.com"
      tls:
        mode: Terminate
        certificateRefs:
          - name: wildcard-example-com
      allowedRoutes:
        namespaces:
          from: Selector
          selector:
            matchLabels:
              gateway-access: "true"
    - name: http
      port: 80
      protocol: HTTP
      allowedRoutes:
        namespaces:
          from: Selector
          selector:
            matchLabels:
              gateway-access: "true"

Handle three edge cases explicitly. HTTP to HTTPS redirect becomes an HTTPRoute on the HTTP listener with a RequestRedirect filter, not an annotation. Backend TLS, where the gateway re-encrypts to pods, maps to BackendTLSPolicy where supported; test certificate validation against your service names. Client certificate authentication and mTLS at the edge need controller-specific policy, so flag those hostnames during inventory. Test every hostname with openssl s_client or curl --resolve against the new gateway address before DNS moves.

Plan certificate renewal as part of the migration, not after it. A Gateway listener referencing a Secret that nobody renews will fail on the certificate expiry date, weeks after cutover, when the migration team has dispersed. Confirm cert-manager owns each referenced Secret, test a renewal in staging by forcing reissue, and alert on days-to-expiry for the new Secrets. TLS failures after a successful migration are embarrassing precisely because they were predictable.


8. CORS, Timeouts, and Limits in Gateway API Migration from Ingress NGINX

CORS, timeouts, and limits in Gateway API migration from Ingress NGINX split across standard fields and controller policies. HTTPRoute carries request timeouts, CORS often needs a policy CRD, and body-size limits may move to the controller or the application. Map each annotation to a named owner before cutover.

Annotation mapping is where migrations stall, so build the map as a table and assign each row an owner and a test. Standard Gateway API covers timeouts on HTTPRoute rules and header filters. CORS, rate limiting, body-size limits, IP allowlists, and external auth usually land in controller policy resources such as Envoy Gateway SecurityPolicy or BackendTrafficPolicy, or in NGINX Gateway Fabric policies.

ingress-nginx annotation Gateway API target Verify
rewrite-target URLRewrite filter backend path and redirects
enable-cors, cors-allow-origin controller CORS policy preflight and actual request
proxy-read-timeout HTTPRoute timeouts.request slow endpoint behaviour
proxy-body-size controller policy or app limit oversized upload returns 413
limit-rps rate-limit policy burst behaviour per client
canary-weight weighted backendRefs traffic split over 10 minutes
configuration-snippet manual redesign no direct equivalent

Timeouts deserve care. ingress-nginx proxy timeouts are TCP-level settings, while HTTPRoute timeouts are request-level. A long-lived streaming or websocket route needs explicit testing, because a converted default can cut connections the old controller allowed. Body-size limits deserve the same care: if the new controller cannot enforce the same limit, enforce it in the application or accept the difference in writing. Silent behaviour changes are the failure mode; documented ones are engineering.

For every annotation with no standard equivalent, write the replacement decision in the route's repository. A body-size limit enforced in the application needs a test at the application layer. A rate limit moved to a policy CRD needs dashboard panels. A snippet that becomes a controller extension needs an owner who understands it. Undocumented replacements decay into the same folklore that made ingress-nginx annotations hard to migrate in the first place.


9. Parallel Running During Gateway API Migration from Ingress NGINX

Parallel running during Gateway API migration from Ingress NGINX means both controllers serve the same backends while DNS still points at the old gateway. Validate the new gateway with curl --resolve, synthetic checks, and mirrored test traffic, then compare error rates and latency against the baseline you captured earlier.

Install the new controller beside ingress-nginx. Both can route to the same Services, so the application does not change. The new Gateway gets its own load balancer address. Nothing user-visible moves until you change DNS or weighted records, which makes rollback a DNS change rather than a redeploy.

Validate in layers. First, route status: every HTTPRoute should report Accepted and ResolvedRefs true, and the Gateway should report Programmed. Second, request behaviour: run your regression script against the new address with curl --resolve for each hostname, covering rewrites, redirects, CORS, auth failures, and oversized bodies. Third, load behaviour: send synthetic traffic at production-like rates and compare p95 latency and 5xx rates with the baseline. Fourth, observability: confirm access logs and per-route metrics arrive in the same dashboards and alerts your on-call already watches.

Keep the parallel window long enough to see a full traffic cycle, including peak hours and batch jobs that call your APIs. A gateway that passes a Tuesday morning test can still fail a Monday peak. If name resolution inside the cluster misbehaves during testing, the CoreDNS troubleshooting guide covers the checks to run before blaming the gateway.

Mirror a slice of real traffic where the controller supports it, or replay access-log requests against the new gateway in staging. Synthetic checks prove the paths you remembered; replayed traffic proves the paths clients actually use, including legacy endpoints nobody documented. Compare status code distributions between old and new for the same request set. A mismatch in 404 or redirect rates is a conversion bug found cheaply.


10. Cutover and Rollback in Gateway API Migration from Ingress NGINX

Cutover and rollback in Gateway API migration from Ingress NGINX work through gradual DNS or weighted-record shifts per hostname, with ingress-nginx left running until the new gateway holds full traffic cleanly. Rollback is a DNS change back to the old address, rehearsed before the first production shift.

Shift one low-risk hostname first. Lower its DNS TTL a day ahead, move the record to the new gateway, and watch error rate, latency, and backend saturation for a full peak cycle. Then move hostnames in batches ordered by risk, keeping the highest-traffic and payment routes for last, when the new controller has already proven itself under load.

Write the rollback trigger before the first shift. A workable trigger names numbers: 5xx rate above baseline by a set margin for ten minutes, p95 latency doubling, or any TLS failure on a moved hostname. The rollback action is equally concrete: restore the DNS record to the ingress-nginx address and confirm traffic returns. Rehearse that action on the first hostname while stakes are low.

Do not delete ingress-nginx at the end of cutover day. Keep it installed, with its Ingresses intact, for an agreed soak period. Removal is a separate change with its own review: delete Ingress resources, remove the controller, release its load balancer, and confirm no hostname still resolves to the old address. Teams that delete the old path immediately lose their fastest rollback exactly when late-surfacing path bugs appear.

Communicate the cutover calendar to teams whose clients hardcode IP addresses or pin certificates. DNS-based rollback only helps clients that resolve DNS. Partners with pinned addresses need the new load balancer address in advance and a test window. Inventory those clients during the parallel phase by watching connection sources that bypass DNS, and give them a named contact for cutover day.


11. Troubleshooting Gateway API Migration from Ingress NGINX Routes

Troubleshooting Gateway API migration from Ingress NGINX routes starts with route and Gateway status conditions, then moves to listener hostname matching, backend endpoint health, and controller logs. Most failures are attachment problems, unresolved references, or path semantics, and each has a distinct status signal to read first.

Read status before reading logs. An HTTPRoute that is not Accepted usually points at a parentRef problem: wrong Gateway name, wrong namespace, a sectionName that does not exist, or allowedRoutes that excludes the route namespace. ResolvedRefs false points at a backendRef naming a Service or port that does not exist, or a cross-namespace reference without a ReferenceGrant.

Symptom Likely cause First check
404 from new gateway no route matched hostname or path HTTPRoute hostnames and matches
Route Accepted false allowedRoutes excludes namespace Gateway listener allowedRoutes
ResolvedRefs false bad backendRef or missing ReferenceGrant Service name, port, grant
TLS handshake failure listener certificate mismatch certificateRefs and SNI hostname
Backend receives wrong path rewrite semantics differ regression script per path
Intermittent 503 backend endpoints empty or draining Service endpoints and readiness
Websocket drops request timeout too low HTTPRoute timeouts on that rule

When the gateway returns 503 with healthy routes, check the backend path itself: endpoints, readiness, and network policy between gateway namespace and application namespace. The container networking troubleshooting guide walks the packet path when routing looks correct but traffic does not arrive. Keep a per-hostname test script from the parallel phase; it turns each row of this matrix into a repeatable check.

Keep the troubleshooting matrix beside the runbook during cutover, with the regression script one command away. Most cutover issues are route attachment, reference, or path problems that status conditions name directly. The engineer on call should read status, run the script, and check the matrix row before paging the migration team. That order keeps small fixes small and reserves escalation for genuine controller faults.


12. Gateway API Migration from Ingress NGINX Final Checklist

Gateway API migration from Ingress NGINX is complete when every hostname serves from the new Gateway, ingress-nginx is removed, and regression tests guard the converted routes. Use this final checklist to close the migration: inventory reconciled, warnings resolved, TLS verified, rollback retired, and dashboards watching the new edge.

Close the migration deliberately. Reconcile the original inventory against the new state: every Ingress hostname has an HTTPRoute, every annotation maps to a field, a policy, or a documented difference, and every ingress2gateway warning has a resolution note. Confirm cert-manager renews the Gateway certificates and that renewal alerts fire on the new Secrets.

Run the final checklist as a change review:

  • All hostnames resolve to the new gateway and pass the regression script.
  • HTTPRoutes report Accepted and ResolvedRefs true in every namespace.
  • TLS certificates cover every SNI hostname and renewal is automated.
  • CORS, timeouts, body limits, and canary weights match the annotation map.
  • Dashboards and alerts watch the new controller, not the retired one.
  • ingress-nginx Ingresses, controller, and load balancer are removed.
  • The old DNS records and TTL changes are cleaned up.
  • Route regression tests run in CI on controller upgrades.

Then record what the migration taught you: which annotations had no equivalent, which controller policies you now depend on, and which routes carry manual behaviour. That record is the starting point for the next edge change, and it keeps Gateway API migration from Ingress NGINX from becoming folklore. The edge is maintained again, routing is typed and reviewable, and application teams own their routes without touching shared gateway configuration.

After removal, run a final scan for orphaned resources: unused TLS Secrets, stale DNS records, load balancer listeners with no traffic, and monitoring targets pointing at the retired controller. Orphans cost money and confuse the next migration. Record the removal evidence with the same care as the cutover evidence, so an auditor can trace the edge from retired controller to maintained gateway without interviewing the team.

Frequently Asked Questions

How long does Gateway API migration from Ingress NGINX take?

Gateway API migration from Ingress NGINX takes days for a cluster with plain host routing and weeks when regex rewrites, snippets, external auth, or canary annotations appear. The inventory decides the estimate: count Ingresses, annotation types, and special cases first, then convert one namespace at a time with parallel validation before any DNS shift.

Can Gateway API migration from Ingress NGINX run without downtime?

Yes. Gateway API migration from Ingress NGINX runs both controllers against the same Services, validates the new gateway with curl --resolve and synthetic traffic, then shifts DNS per hostname. ingress-nginx stays installed during the soak period, so rollback is a DNS change back to the old address rather than a redeploy.

What does ingress2gateway not convert in Gateway API migration from Ingress NGINX?

ingress2gateway converts structure and more than thirty common annotations, but Gateway API migration from Ingress NGINX still needs manual work for configuration snippets, some body-size limits, URL normalisation, and capture-group rewrites. Treat each converter warning as a tracked item with an owner, a chosen equivalent, and a regression test.

Which controller should I pick for Gateway API migration from Ingress NGINX?

Pick the controller that passes your hardest route in a proof of concept. Envoy Gateway fits Envoy-standardised teams, NGINX Gateway Fabric suits NGINX habits, and Istio or Cilium fit clusters already running them. Verify filters, policy CRDs, TLS behaviour, metrics, and upgrade cadence before converting in bulk.

Does Gateway API migration from Ingress NGINX require changing applications?

Usually not. Gateway API migration from Ingress NGINX keeps the same Services and pods; HTTPRoutes point at existing backends. Application changes appear only where NGINX-only behaviour, such as a snippet or a body-size rule, has no controller equivalent and the limit or header logic must move into the application.

How do I handle rewrite-target in Gateway API migration from Ingress NGINX?

Translate rewrite-target to an HTTPRoute URLRewrite filter with ReplacePrefixMatch for prefix rewrites, and review regex or capture-group cases by hand. In Gateway API migration from Ingress NGINX, test each rewritten path for backend path, redirect targets, trailing slashes, and encoded characters before cutover.

Is the Ingress API itself removed by Gateway API migration from Ingress NGINX?

No. The Ingress API is frozen but still supported by other controllers; the ingress-nginx controller is the retired component. Gateway API migration from Ingress NGINX is still the recommended path because Gateway API is the maintained successor with typed routing fields instead of annotations.