ingress-nginx was retired
in March 2026. Last release was v1.15.1, the repo is archived, and there won't be another
security fix. It still runs fine. That's exactly why it's easy to forget about. Do you have it?
kubectl get pods -A --selector app.kubernetes.io/name=ingress-nginx
You could swap in another Ingress controller. But if I'm going to touch every route anyway, I'd rather move to Gateway API once and be done with it.
What actually changes
The YAML isn't the big change. Ownership is. TLS and listeners move to the platform team, and app teams only own their routes.
Hosts, paths and backends are easy. Annotations are where your week goes.
The setup
Don't cut over in place. Run both controllers, each with its own load balancer, in front of the same Services. DNS decides who gets what.
The steps
Prepare
# 1. which ingress-nginx annotations do we actually use?
kubectl get ingress -A -o json \
| jq -r '.items[].metadata.annotations // {} | keys[]' \
| grep '^nginx.ingress.kubernetes.io/' | sort | uniq -c | sort -rn
# 2. Gateway API CRDs (skip if your cloud manages them)
kubectl apply --server-side -f \
https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.7.0/standard-install.yaml
# 3. first draft of the routes
ingress2gateway print --providers=ingress-nginx --all-namespaces > gateway-api.yaml
ingress2gateway gets you most of the way. Read every warning it prints. Then read Before You Migrate: ingress-nginx quietly does case-insensitive prefix regex, trailing-slash redirects and URL normalization, and a clean-looking conversion loses all of it.
A converted app ends up like this. The HTTPS redirect is its own route now:
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: public
namespace: gateway
annotations:
cert-manager.io/cluster-issuer: letsencrypt-dns01
spec:
gatewayClassName: my-gateway-class
listeners:
- name: http
port: 80
protocol: HTTP
allowedRoutes: { namespaces: { from: All } }
- name: https-shop
hostname: shop.example.com
port: 443
protocol: HTTPS
tls:
certificateRefs: [{ name: shop-example-com-tls }]
allowedRoutes: { namespaces: { from: All } }
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: { name: shop-redirect, namespace: shop }
spec:
parentRefs: [{ name: public, namespace: gateway, sectionName: http }]
hostnames: [shop.example.com]
rules:
- filters:
- type: RequestRedirect
requestRedirect: { scheme: https, statusCode: 301 }
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: { name: shop, namespace: shop }
spec:
parentRefs: [{ name: public, namespace: gateway, sectionName: https-shop }]
hostnames: [shop.example.com]
rules:
- matches: [{ path: { type: PathPrefix, value: /api } }]
backendRefs: [{ name: shop-api, port: 8080 }]
timeouts: { request: 60s }
- matches: [{ path: { type: PathPrefix, value: / } }]
backendRefs: [{ name: shop-web, port: 80 }]
Certificates
Test
Then replay real paths from the access log against both IPs and chase every difference:
H=shop.example.com
OLD=203.0.113.10 # the ingress-nginx load balancer
NEW=$(kubectl get gateway -n gateway public -o jsonpath='{.status.addresses[0].value}')
# paths.txt: real paths from the ingress-nginx access log
while read -r p; do
a=$(curl -s -o /dev/null -w '%{http_code}' --resolve $H:443:$OLD "https://$H$p")
b=$(curl -s -o /dev/null -w '%{http_code}' --resolve $H:443:$NEW "https://$H$p")
[ "$a" = "$b" ] || echo "DIFF $p old=$a new=$b"
done < paths.txt
Shift
Drop the TTL to 60s a day before. Hold each step through a peak and compare 5xx and p99 on both paths side by side. If ExternalDNS owns the records, take it out of the loop until you're done, otherwise its Ingress and HTTPRoute sources fight over the same name.
Finish
Leave the old path up for a week. JVM DNS caches, long-lived connections and hard-coded IPs don't care about your TTL. Turn it off when its access log goes quiet. One trap: deleting an annotated Ingress also deletes its cert-manager Certificate.
Gotchas
- Regex matching is implementation-specific. Envoy-based controllers match the full path, case-sensitive.
- Client IPs: same
externalTrafficPolicyor PROXY protocol as before. - Your IP changes. Tell anyone who allow-lists it.
- Cross-namespace Secrets and Services need a ReferenceGrant, and a missing one only shows up in route status.