If you learned Kubernetes networking through Ingress, the Gateway API can look like a lot of new objects to do the same job. It is not the same job, though. Ingress was designed when "route this hostname to that service" was most of what people needed. Gateway API is designed for clusters where a platform team runs the load balancers and dozens of app teams need to route their own traffic without stepping on each other.
This guide walks through the pieces using one example request.
The problem Ingress left behind
An Ingress object mixes two kinds of decisions. Which load balancer, which ports, which TLS settings: those are infrastructure choices. Which paths go to which service: those are app choices. Both live in one object, edited by whoever has access.
Anything beyond basic routing, like canary weights, header matching or timeouts, lives in annotations that only one controller understands. Moving from one controller to another means rewriting all of them. That became a real problem when the community ingress-nginx controller was retired earlier this year.
The three objects that matter
GatewayClass says which implementation handles gateways of this kind, a bit like a StorageClass for traffic. Your cloud provider or the controller you install usually creates it. You rarely touch it.
Gateway is an actual entry point: a load balancer with listeners on certain ports and hostnames, and TLS settings. The platform team owns these. A Gateway also says which namespaces are allowed to attach routes to it.
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: public
namespace: infra
spec:
gatewayClassName: example-lb
listeners:
- name: https
protocol: HTTPS
port: 443
hostname: "*.example.com"
tls:
certificateRefs:
- name: wildcard-example-com
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
gateway-access: public
HTTPRoute is where app teams describe their traffic. It attaches to a Gateway by name and lists rules: match these hosts, paths or headers, send them to these backends.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: checkout
namespace: shop
spec:
parentRefs:
- name: public
namespace: infra
hostnames: ["shop.example.com"]
rules:
- matches:
- path: { type: PathPrefix, value: /checkout }
backendRefs:
- name: checkout-v1
port: 8080
weight: 90
- name: checkout-v2
port: 8080
weight: 10
That weight field is a canary release, written in the standard API. No annotations, and it works the same way on any conformant implementation.
Following one request
A user opens https://shop.example.com/checkout. The load balancer behind the public Gateway terminates TLS using the wildcard certificate. It looks at the routes attached to its HTTPS listener, finds the checkout HTTPRoute matching that host and path, and sends 90% of such requests to checkout-v1 and 10% to checkout-v2.
The platform team never had to edit anything for the shop team to set this up, and the shop team could not change the certificate or open a new port if they tried. That separation is the main reason to adopt Gateway API, more than any single feature.
Crossing namespaces safely
By default a route can only send traffic to services in its own namespace. If the shop team wants to route to a service owned by another team, the owning team has to allow it with a ReferenceGrant in their namespace. It is a small object, but it means nobody can quietly point traffic at someone else's backend.
Other route types
HTTPRoute is the one most people use. There is also GRPCRoute for gRPC services, and TLSRoute, TCPRoute and UDPRoute for traffic that is not HTTP. Support for the non-HTTP routes varies between implementations, so check the conformance report for whichever one you use.
Gateway API and Ingress side by side
| Ingress | Gateway API | |
|---|---|---|
| Who edits what | One object for everything | Gateway for platform, routes for app teams |
| Canary weights, header matching | Controller-specific annotations | Part of the spec |
| Protocols | HTTP and HTTPS | HTTP, gRPC, TLS, TCP, UDP |
| Status | Stable but frozen | Where new features land |
Getting started
Pick an implementation first. Managed options exist on the big clouds, including EKS Auto Mode, which now supports Gateway API with no controller to install. In-cluster options include Envoy Gateway, Istio, Cilium (see our look at Cilium 1.20) and NGINX Gateway Fabric.
Then move one low-risk service. Ingress and Gateway API can run side by side, so you can shift DNS gradually and watch error rates. The ingress2gateway tool will translate many Ingress objects into routes for you, though anything that relied on unusual annotations needs a human to read it.
Quick answers
Is Gateway API replacing Ingress?
Ingress still works and is not being removed, but it is feature-frozen. New networking features in Kubernetes land in Gateway API, which is the recommended choice for new work.
What is the difference between a Gateway and an HTTPRoute?
A Gateway is the entry point, with its ports, hostnames and TLS settings, usually owned by a platform team. An HTTPRoute holds the routing rules for an application and attaches to a Gateway.
How do I do a canary release with Gateway API?
List two backends in an HTTPRoute rule and give each a weight, for example 90 and 10. The implementation splits traffic in that ratio without any vendor annotations.







