Kubernetes Gateway API: The Successor to Ingress

Kubernetes Gateway API: The Successor to Ingress

For years, the Ingress resource was the standard way to expose HTTP services running in Kubernetes. It worked, and it worked everywhere, but it was always a compromise. Ingress defined the smallest possible common surface: a host, a path, and a backend Service. Everything else a real deployment needed, from header-based routing to request timeouts, was pushed into vendor-specific annotations, which were never portable, never validated, and never documented in one place, so the same manifest could behave differently on two controllers.

The Gateway API was built to replace that compromise. It is a set of Kubernetes resources designed for how teams run clusters today: one shared entry point owned by the platform team, routing rules owned by the application teams, and a clean split between the portable API core and implementation-specific extensions. Gateway API reached stable v1.0 in October 2023, and the latest release, v1.5, shipped on 27 February 2026. Nearly every major ingress and service mesh project has adopted it since.

This guide explains how the Gateway API works and how to run it in a real cluster: installing the CRDs and a controller, building a Gateway and an HTTPRoute, adding header and path routing, terminating TLS, and migrating from Ingress without downtime.

Why Ingress Ran Out of Room

Ingress was designed in 2015, when exposing a web service meant little more than pointing a hostname at a Service. It deliberately left everything beyond host, path, and backend to implementations. That made Ingress easy to adopt, because every controller could implement the basics, but it also meant there was no standard way to express anything beyond them.

The gap showed up first in annotations. Every controller invented its own. NGINX Ingress used one set, the AWS load balancer controller used another, and Traefik used a third. A feature as basic as rewriting a URL path had three different spellings, and moving a workload from one controller to another meant rewriting every Ingress object by hand. Worse, annotations are untyped strings. A typo in an annotation value produces no error: the object is accepted, the controller silently ignores the annotation, and the behavior you expected simply never happens.

The second problem was the shape of the object itself. Ingress was a single resource, and in most clusters it became a shared resource. Every team that needed a route added rules to the same Ingress objects, or created their own that all competed for the same load balancer. There was no way to say that the platform team owns the listener while the application team owns only the routes for its own Service, and no way to grant a developer permission to change routing for their own namespace without giving them permission to change it for everyone else.

The third problem was expressiveness. Modern traffic management needs more than host and path matching: teams want to route a percentage of traffic to a new version, match on headers, and set timeouts and retries per route. Ingress could not express any of that in its core API, so every one of those features became an annotation too. Our Kubernetes Ingress tutorial covers the classic Ingress model in detail, and it is still worth reading if you maintain an existing Ingress setup, because understanding what Ingress could not do is the fastest way to understand why Gateway API exists. The retirement of the community ingress-nginx project by Kubernetes SIG Network in March 2026 made the direction clear: new work is going to the Gateway API.

The Three Gateway API Objects and Who Owns Each

The Gateway API splits the old single Ingress object into three resources, each belonging to a different role. This role-based split is the most important idea in the whole design: it lets a platform team and many application teams share one cluster without stepping on each other. The three resources are GatewayClass, Gateway, and HTTPRoute, and understanding who owns each one tells you how to organize them in your own cluster.

GatewayClass is the cluster-wide template. It names an implementation and describes the kind of load balancing that implementation provides. A cluster administrator creates one GatewayClass per controller, each pointing at its controller through the controllerName field. Application teams never create GatewayClasses; they choose one when they create a Gateway. Envoy Gateway creates a GatewayClass like this when it installs:

apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: envoy
spec:
  controllerName: gateway.envoyproxy.io/gatewayclass-controller

Gateway is the shared entry point, and it belongs to the platform or infrastructure team. A Gateway defines the listeners that accept traffic: which ports, which protocols, which hostnames, and which TLS certificates. It is the object that gets the external IP address or the load balancer, and its status reports the addresses clients should connect to. The platform team creates the Gateway once, configures its listeners, and hands the routing to the application teams. Because a Gateway lives in one namespace while routes attach to it from many namespaces, one Gateway can serve an entire cluster while each team manages only its own routes.

HTTPRoute is where the application teams live. An HTTPRoute attaches to a Gateway through a parentRef, declares the hostnames it serves, and defines rules that match requests and send them to backend Services. Each rule can match on path, header, query parameter, and method, and can send traffic to one or more backends with weights. An application team creates HTTPRoutes in its own namespace, pointing at the shared Gateway, with no permission on the Gateway itself. The Gateway can also limit which namespaces may attach routes to it, using the allowedRoutes field.

This split solves the problems Ingress could not. There is no shared object that every team edits, and no annotation sprawl for common features, because matching, weighting, filtering, and header manipulation are all first-class fields in the API, validated by the Kubernetes API server before they are applied. The API is the same regardless of the controller behind it, so an HTTPRoute written for Envoy Gateway works the same way against any other conformant implementation. Two supporting resources complete the picture: ReferenceGrant lets an HTTPRoute send traffic to a Service in another namespace through a small explicit grant created by the Service owner, and GRPCRoute extends the same model to gRPC traffic.

Installing the CRDs and a Controller

Gateway API resources are not built into Kubernetes. They are custom resource definitions shipping on their own release cycle, independent of the Kubernetes version you run, so you can adopt the newest Gateway API without upgrading Kubernetes, as long as you meet the minimum supported version. Gateway API v1.5 needs Kubernetes 1.30 or later, and the current minor is 1.37, with 1.37.3 released on 25 November 2026, so any cluster updated in the last year comfortably qualifies.

The first step is installing the CRDs. The project publishes two install manifests per release: a standard channel and an experimental channel. The standard channel contains the stable resources, GatewayClass, Gateway, HTTPRoute, GRPCRoute, and ReferenceGrant, and it is what you want in production. The experimental channel adds resources still being developed, such as TCPRoute, UDPRoute, and TLSRoute. Install the standard channel first.

# Install the Gateway API CRDs (standard channel, v1.4.0)
kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml

# Confirm the CRDs are present
kubectl get crd | grep gateway.networking.k8s.io

Use server-side apply for these manifests: the CRD bundles are large, and client-side apply can fail because the last-applied annotation exceeds its size limit. Pin the CRD version in production, and check that your controller supports the version you install. Gateway API v1.4.0 is a safe, widely supported choice, and v1.5, released on 27 February 2026, is the latest stable release if your controller already supports it. The official Gateway API documentation lists every implementation and the version each one supports, so check your controller’s support matrix first.

With the CRDs installed, the next step is a controller. The CRDs define the API, but they do nothing on their own: a controller watches GatewayClass, Gateway, and HTTPRoute objects and configures a data plane, such as Envoy or NGINX, to carry the traffic. Envoy Gateway is a good default for this guide: the reference implementation, maintained by the Envoy project, installing with Helm. NGINX Gateway Fabric is the equivalent choice if your team already standardizes on NGINX.

# Add the Envoy Gateway Helm repository and install the controller
helm repo add envoy-gateway https://charts.envoyproxy.io
helm repo update
helm install eg envoy-gateway/gateway-helm \
  --namespace envoy-gateway-system --create-namespace

# Confirm the controller is running
kubectl get pods -n envoy-gateway-system

Before going further, check that the controller has registered its GatewayClass. Envoy Gateway creates a GatewayClass named envoy when it installs, with controllerName gateway.envoyproxy.io/gatewayclass-controller. If it is missing, the controller did not install correctly, and Gateways created against it will stay pending. Our Amazon EKS tutorial covers setting up a managed cluster if you have not provisioned one yet. An accepted GatewayClass shows Accepted: True, and that status is your first diagnostic tool: if a Gateway never gets an address, check the GatewayClass first, then the Gateway, then the routes.

Building a Gateway and an HTTPRoute: A Working Example

With the CRDs and the controller in place, the whole model comes together in two objects. The GatewayClass already exists from the controller installation, so the platform team only needs to create a Gateway, with its listeners. Then an application team creates an HTTPRoute that attaches to that Gateway and sends traffic to its Services. The example below builds exactly that, using a demo application with a web frontend and an API backend.

Start with the Gateway. It listens on port 80 for plain HTTP and declares the hostname it serves. The gatewayClassName field selects the envoy GatewayClass, telling the Envoy Gateway controller to provision the data plane. When the Gateway is accepted, the controller assigns it an address, usually the external IP of a load balancer Service it creates.

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: web
  namespace: gateway-system
spec:
  gatewayClassName: envoy
  listeners:
    - name: http
      port: 80
      protocol: HTTP
      hostname: shop.example.com

Apply it and confirm the address appears in its status, then make sure the demo Services exist: web-service on port 80 and api-service on port 8080, each backed by a simple NGINX Deployment. If you already have Services in your cluster, use your own Service names in the HTTPRoute.

kubectl apply -f gateway.yaml
kubectl get gateway web -n gateway-system

Now create the HTTPRoute. It attaches to the Gateway with a parentRef, declares the hostname it serves, and defines two rules. Requests whose path starts with /api go to the API Service, and every other request goes to the web Service. Rule order matters: the controller evaluates rules in the order listed, and the first matching rule wins, so the more specific /api rule comes first and the catch-all / rule comes last.

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: shop-routes
  namespace: default
spec:
  parentRefs:
    - name: web
      namespace: gateway-system
  hostnames:
    - shop.example.com
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /api
      backendRefs:
        - name: api-service
          port: 8080
    - matches:
        - path:
            type: PathPrefix
            value: /
      backendRefs:
        - name: web-service
          port: 80

Apply the route and verify it. A healthy HTTPRoute shows Accepted: True, and its parent status shows the Gateway has programmed the route. Test it with curl, passing the Host header if you have no real DNS yet: the API path should reach the API Service, and the root path the web Service.

kubectl apply -f httproute.yaml
kubectl get httproute shop-routes -n default

# Test routing (replace the IP with your Gateway address)
curl -H "Host: shop.example.com" http://GATEWAY-IP/
curl -H "Host: shop.example.com" http://GATEWAY-IP/api

If a request does not reach the right backend, the HTTPRoute status is the first place to look. Common causes are a parentRef pointing at the wrong Gateway name or namespace, a hostname that does not match the Gateway listener, or a backendRef pointing at a Service that does not exist or has no endpoints. Each produces a clear status condition, a sharp contrast with Ingress, where the same mistakes produced a silent 404 or a default backend with no explanation.

Header and Path Routing

Path routing is only the beginning. A single HTTPRoute rule can match on several dimensions at once: path, header, query parameter, and method. Combining those matchers lets you express routing decisions that Ingress could only approximate with annotations, in a typed, validated form the API server checks before the route is programmed.

Header matching is the most common next step after path routing, and a canary deployment is the classic example: send requests with a specific header value to the new version, and everyone else to the stable version. The rule below sends requests with the header x-canary set to true to the canary Service, while all other requests fall through to the stable Service.

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: canary-routes
  namespace: default
spec:
  parentRefs:
    - name: web
      namespace: gateway-system
  hostnames:
    - shop.example.com
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /
          headers:
            - name: x-canary
              value: "true"
      backendRefs:
        - name: web-canary
          port: 80
    - matches:
        - path:
            type: PathPrefix
            value: /
      backendRefs:
        - name: web-service
          port: 80

Weighted backends take the same idea further. Instead of matching a header, split a percentage of traffic between two backends: the example below sends 90 percent of requests to the stable Service and 10 percent to the canary Service. The weights are relative, but numbers that add to 100 make the intent obvious to the next person reading the manifest. This is the cleanest way to run a gradual rollout: start at 5 percent, watch your metrics, and raise the weight in small steps.

    - matches:
        - path:
            type: PathPrefix
            value: /
      backendRefs:
        - name: web-service
          port: 80
          weight: 90
        - name: web-canary
          port: 80
          weight: 10

Filters add a third capability: modifying the request or the response as it passes through the route. The built-in filters cover the operations teams need most often. RequestHeaderModifier adds, sets, or removes headers on the way in, and ResponseHeaderModifier does the same on the way out. RequestRedirect sends the client to a different URL, which is how you implement HTTP to HTTPS redirects and old-path to new-path redirects without touching the application. URLRewrite changes the path before it reaches the backend, so an external path such as /v2/orders can be rewritten to /orders before it hits the Service. The query parameter matcher lets a rule match on the query string, and method matching lets a rule match only GET or only POST requests. Together, these matchers let a single HTTPRoute express a routing table that would have taken several Ingress objects and a pile of annotations to approximate.

    - matches:
        - path:
            type: PathPrefix
            value: /v2
      filters:
        - type: URLRewrite
          urlRewrite:
            path:
              type: ReplacePrefixMatch
              replacePrefixMatch: /
        - type: RequestHeaderModifier
          requestHeaderModifier:
            add:
              - name: X-Api-Version
                value: "v2"
      backendRefs:
        - name: api-service
          port: 8080

TLS Termination and Certificates

Plain HTTP is fine for a local test, but production traffic needs TLS, and the Gateway API handles it at the listener level, which is exactly where it belongs. TLS is a property of the entry point, not of any individual route, so it is configured on the Gateway listener rather than on the HTTPRoute. One certificate configuration then serves every route attached to the Gateway, and the application teams never need to think about certificates at all.

To terminate TLS, add an HTTPS listener to the Gateway and point it at a TLS Secret in the same namespace as the Gateway. The Secret must be of type kubernetes.io/tls, with a tls.crt and a tls.key. The listener also needs a hostname, because the Gateway uses Server Name Indication to pick the right certificate when it serves more than one hostname.

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: web
  namespace: gateway-system
spec:
  gatewayClassName: envoy
  listeners:
    - name: http
      port: 80
      protocol: HTTP
      hostname: shop.example.com
    - name: https
      port: 443
      protocol: HTTPS
      hostname: shop.example.com
      tls:
        mode: Terminate
        certificateRefs:
          - name: shop-tls

The tls.mode field is set to Terminate: the Gateway decrypts the traffic and forwards plain HTTP to the backends. That is the common case. The alternative mode is Passthrough, which forwards the encrypted connection to the backend untouched, used with TLSRoute rather than HTTPRoute, for cases where the backend itself must terminate TLS.

In practice, most teams do not manage TLS Secrets by hand. They use cert-manager, which watches Gateway objects, requests certificates from an issuer such as Let’s Encrypt, and writes the resulting Secret into the Gateway namespace automatically. Add the cert-manager annotation to the Gateway, and cert-manager creates a Certificate resource, completes the challenge, and stores the Secret, which the Gateway then picks up from the certificateRef. Renewal happens automatically.

# Install cert-manager, then annotate the Gateway
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.18.2/cert-manager.yaml

# Add to the Gateway metadata.annotations:
#   cert-manager.io/cluster-issuer: letsencrypt-prod

Two details deserve attention. First, a Gateway listener can reference a certificate in its own namespace only; a certificate in another namespace needs a ReferenceGrant there. Second, HTTP to HTTPS redirection is a route-level concern: the standard pattern is an HTTPRoute attached to the HTTP listener with a RequestRedirect filter sending every request to the HTTPS listener with a 301 status code, using sectionName in the parentRef to attach the route to one specific listener.

Migrating from Ingress Without Downtime

Migration is where most Gateway API projects succeed or fail, and the deciding factor is almost always the same: whether the team tried a single cutover or a gradual shift. A cutover, deleting all Ingress objects and creating Gateway API objects in one change window, concentrates every risk into one moment. A gradual migration spreads the same work across weeks, with a rollback path at every step. For a production cluster, the gradual path is the only sensible choice. Gateway API and Ingress can run side by side in the same cluster, so nothing changes for your users while you build the new configuration.

Start with an inventory. List every Ingress object, note which controller serves each one, and record the annotations each one uses. Every annotation represents a feature to translate into a Gateway API equivalent: a path rewrite becomes a URLRewrite filter, a header manipulation a RequestHeaderModifier filter, and a timeout or retry setting a policy object, which is implementation-specific, so check what your controller supports. The official Kubernetes Gateway API documentation describes the portable core; the controller documentation describes the policy objects that extend it.

Then pick one low-risk service and migrate it first. Create a Gateway for it, or attach its routes to a shared Gateway, and write the HTTPRoute that reproduces the Ingress behavior. Test the new route with a temporary hostname or a Host header override before you touch DNS, comparing the behavior request by request: same paths, same headers, same redirects, same error responses. When it behaves identically, switch traffic at the DNS level, pointing the hostname at the Gateway address and keeping the Ingress object in place as the rollback path. If anything goes wrong, change DNS back and the old route serves traffic again within the DNS time-to-live. If it goes right, leave the Ingress object for a few days as a safety net, then delete it. Repeat for the next service, and the next, until the Ingress objects are gone.

There are three traps to watch for. The first is annotation features with no portable equivalent: some Ingress annotations, such as custom NGINX configuration snippets, have no Gateway API equivalent at all, because they depended on the internals of a specific proxy. For those, the answer is usually a controller policy object, or a redesign of the feature. The second trap is path matching semantics: Ingress pathType Prefix and Gateway API PathPrefix look the same but are not identical, so test every path rule rather than assuming it translates. The third trap is the default backend: Ingress had a cluster-wide default backend for unmatched requests, and Gateway API has none. Unmatched requests get a 404, so make sure every hostname you migrate has a route that covers it.

One final consideration is timing. The Ingress API itself is not going away, and existing Ingress controllers will keep working, so there is no deadline forcing a rushed migration. But the direction of the ecosystem is clear, and the retirement of the community ingress-nginx project in March 2026 is the clearest signal yet. New controllers are built for the Gateway API first. Migrating gradually, starting now, means you get there on your own schedule rather than under pressure later. If you are still building the fundamentals of cluster networking, our networking basics for DevOps engineers guide covers the underlying concepts, from Services to DNS.

Frequently Asked Questions

Is Gateway API a replacement for Ingress?

Yes. Gateway API is the successor to Ingress, designed by the same Kubernetes SIG Network community that maintains Ingress. It covers everything Ingress does and adds role-based resource ownership, richer matching, weighted traffic splitting, and built-in filters, all as typed API fields rather than unvalidated annotations. Ingress still works, but new development focuses on Gateway API.

Do I need to upgrade Kubernetes to use Gateway API?

No. Gateway API ships as custom resource definitions on its own release cycle, independent of the Kubernetes version. Gateway API v1.5 needs Kubernetes 1.30 or later, and the current minor is 1.37, so any cluster updated in the last year qualifies.

Which controller should I choose?

Choose the controller that matches your existing stack and your team’s experience. Envoy Gateway is a strong default and the reference implementation, NGINX Gateway Fabric is the natural choice for NGINX shops, and cloud providers offer managed options, such as the AWS load balancer controller on EKS. Routing resources are portable between controllers, so the choice is less risky than it was with Ingress.

Can Gateway API and Ingress run in the same cluster?

Yes, and that is how most migrations work. The two APIs coexist without interfering, and the same controller can serve both. Install the Gateway API CRDs and controller alongside the existing Ingress setup, migrate one service at a time, and switch traffic at the DNS level, keeping each old Ingress object as a rollback path until the new route proves itself in production.

How do I expose a Service in a different namespace from my route?

By default, an HTTPRoute can only send traffic to Services in its own namespace. To allow a cross-namespace backend, create a ReferenceGrant in the namespace that owns the Service, naming the route’s namespace and the resource type it may use. The grant is explicit and narrow, owned by the Service owner.

Conclusion

Ingress served Kubernetes well for a decade, but it was built for a simpler time, when exposing a web service meant pointing a hostname at a backend and hoping the annotations were spelled correctly. The Gateway API answers everything Ingress could not do: typed, validated routing instead of annotation sprawl, a clean split between the platform team that owns the entry point and the application teams that own their routes, and a portable API that works the same way on any controller. With stable releases since October 2023 and the latest v1.5 release in February 2026, it is the current standard.

Adopt it the way you would adopt any infrastructure change: gradually, with a rollback path at every step. Install the CRDs and a controller next to your existing Ingress setup, migrate one low-risk service first, compare the behavior request by request, and switch traffic at the DNS level. When the last Ingress object is deleted, you will have a networking layer your platform team can govern and your application teams can change without asking permission. That is the real successor to Ingress, ready for your cluster today.

Scroll to Top