Kubernetes Ingress to Gateway API Migration Guide: Zero-Downtime Production Blueprint
The Kubernetes networking landscape is undergoing its biggest evolutionary leap in seven years. With the retirement and maintenance wind-down of legacy ingress-nginx, the Kubernetes Gateway API has graduated to GA and become the undisputed official standard for L4/L7 ingress routing, traffic splitting, and service mesh connectivity.
For platform teams and site reliability engineers (SREs), migrating from traditional Ingress to the Gateway API is no longer an optional experiment—it is a critical architectural upgrade.
In this comprehensive guide, the engineering team at Saksham Cloud Infrastructures breaks down the exact architectural differences, role-oriented primitives, and a battle-tested zero-downtime migration strategy.
1. Why Is Kubernetes Ingress Being Replaced?
The original Ingress resource (introduced back in Kubernetes v1.1) was designed around a simple mental model: map an incoming host and path to an internal Service.
However, as enterprise microservices scaled, several fundamental design flaws emerged:
- Monolithic Responsibility Model: In traditional Ingress, a single YAML file mixed cluster networking (TLS certificates, external IP provisioning, load balancer timeouts) with application logic (path prefixes, URL rewrites). Both platform admins and application developers were forced to edit the same file.
- Annotation Chaos: Because the core Ingress specification lacked primitives for header-based routing, traffic mirroring, canary weight splits, and rate limiting, every controller vendor (NGINX, Traefik, HAProxy) invented custom vendor-locked annotations (e.g.,
nginx.ingress.kubernetes.io/rewrite-target). - Lack of Cross-Namespace Routing: Standard Ingress could only route traffic to backend Services located in the exact same Kubernetes namespace as the Ingress resource itself.
The Gateway API resolves every single one of these limitations through a clean, declarative, role-oriented hierarchy.
2. Gateway API Core Architecture & Role Separation
The Gateway API splits routing responsibilities across three distinct personas:
[Cloud Infrastructure Provider]
│
▼
[GatewayClass] (Cluster-wide definition: Envoy, Cilium, AWS VPC Lattice)
│
▼
[Gateway] (Managed by Platform / Cluster Ops: Ports, TLS certs, IP addresses)
│ │
▼ ▼
[HTTPRoute A] [HTTPRoute B] (Managed by App Devs in distinct namespaces)
│ │
▼ ▼
[Service v1] [Service v2]
The Three Primitives:
GatewayClass(Infra Provider): Defines the underlying controller implementation (e.g.,gateway.envoyproxy.ioorcilium.io).Gateway(Platform Team): Binds to an external load balancer, open ports (80, 443), and TLS secrets. Created once per cluster or environment.HTTPRoute(Application Developers): Defines path routing, header matching, redirects, rewrites, and canary weights pointing to backend microservices.
3. Production Gateway & HTTPRoute Manifests
Let's look at a concrete production example using the Envoy Gateway controller.
Step 1: Provision the Gateway (Platform Operator)
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: production-gateway
namespace: platform-infra
spec:
gatewayClassName: eg
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: All
- name: https
protocol: HTTPS
port: 443
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: wildcard-production-tls
allowedRoutes:
namespaces:
from: All
Step 2: Bind Application Routes with Canary Splitting (Application Team)
Here, the application team defines an HTTPRoute in their own payments namespace, splitting 90% of traffic to the stable production release and 10% to the canary v2 release:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: payments-api-route
namespace: payments
spec:
parentRefs:
- name: production-gateway
namespace: platform-infra
hostnames:
- "api.sakshamcloudinfrastructures.in"
rules:
- matches:
- path:
type: PathPrefix
value: /v1/checkout
backendRefs:
- name: payments-service-v1
port: 8080
weight: 90
- name: payments-service-v2
port: 8080
weight: 10
Notice how clean this is: zero vendor-specific annotations, native weighted traffic splitting, and complete separation between the cluster gateway and application code.
4. Zero-Downtime Migration Playbook (5-Step Cutover)
Migrating an active production cluster handling live revenue requires a phased approach:
Phase 1: Deploy Gateway API CRDs & Controller
Install the official Gateway API Custom Resource Definitions (CRDs) and deploy your chosen controller (such as Envoy Gateway, Cilium, or Kong) alongside your existing Ingress controller:
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml
Phase 2: Dual-Routing Side-by-Side Verification
Deploy your Gateway and HTTPRoute resources matching your current Ingress paths. At this stage, both controllers point to the same backend Services, but your public DNS still points to the old Ingress load balancer.
Phase 3: Synthetic & Staging Traffic Validation
Test the new Gateway load balancer IP directly using curl with host headers:
curl -Iv -H "Host: api.sakshamcloudinfrastructures.in" https://<NEW_GATEWAY_LB_IP>/v1/checkout
Verify TLS handshakes, response codes, and latency metrics in Prometheus.
Phase 4: DNS Weighted Shift (Canary Cutover)
Using AWS Route 53 or Cloudflare, configure a weighted DNS record:
- 90% traffic to the legacy Ingress Load Balancer
- 10% traffic to the new Gateway API Load Balancer
Monitor error rates (5xx), connection drops, and CPU usage. Gradually ramp up to 50%, then 100%.
Phase 5: Decommissioning Ingress-NGINX
Once 100% of production traffic has routed through the Gateway API for at least 72 hours without anomalies, safely prune legacy Ingress resources and uninstall the old ingress-nginx controller.
5. Summary & Key Takeaways
| Feature | Legacy Ingress | Kubernetes Gateway API |
| :--- | :--- | :--- |
| Specification Status | Frozen (Maintenance Mode) | Active GA Standard |
| Persona Separation | ❌ Mixed in single file | ✅ Admin, Platform, Developer |
| Traffic Splitting (Canary) | ❌ Vendor annotations | ✅ Native weight fields |
| Cross-Namespace Routing | ❌ Not supported | ✅ Native ReferenceGrant |
| Port & Protocol Support | ⚠️ HTTP / HTTPS only | ✅ HTTP, HTTPS, TCP, UDP, gRPC |
🛠️ Developer Tool: Need to scaffold Kubernetes Deployments, Services, and Ingress manifests or generate NGINX reverse-proxy configurations? Use our free interactive Kubernetes YAML Builder and NGINX Config Generator.
Need Help Modernizing Your Kubernetes Infrastructure?
Upgrading production clusters to the Kubernetes Gateway API requires meticulous planning around TLS certificates, custom headers, and multi-region failover.
At Saksham Cloud Infrastructures, our certified Kubernetes architects handle end-to-end cloud migrations, GitOps pipelines, and zero-downtime cluster refactors.
Written by Saksham Jain
Founder & Principal Cloud Architect • Saksham Cloud Infrastructures
Specializing in high-availability AWS and Azure architectures, Kubernetes GitOps pipelines, zero-trust cloud security, and actionable FinOps cost reduction strategies for global startups and engineering teams.
Need production-grade cloud architecture & engineering insights architecture?
Our senior infrastructure engineers help US, UK, and global teams architect zero-downtime AWS/Azure environments, automate CI/CD pipelines, and slash monthly cloud spend by up to 40%.