Skip to main content
This guide shows how to enable Gateway API support in Cilium, install the required Gateway API CRDs, enable the feature in the Cilium Helm chart, and configure a Gateway + HTTPRoute to expose multiple apps (shopping.com and blogger.com) plus a default backend.
A screenshot of the Cilium documentation page titled "Gateway API Support," showing explanatory text about the Gateway API and a list of supported resources. A left-hand navigation menu with other documentation links is also visible.

Overview

High-level steps covered:
  • Install Gateway API CRDs (use experimental CRDs for full TCP/TLS/UDP support).
  • Enable Gateway API in the Cilium Helm values and restart Cilium pods.
  • Deploy demo applications and ClusterIP services.
  • Create a Gateway resource (Cilium-provided GatewayClass) and a LoadBalancer service for external access.
  • Create HTTPRoute resources to route host/path combinations to different backends.
  • Test with curl or browser (use /etc/hosts for testing DNS to the gateway IP).

Prerequisites

Follow the Cilium Gateway API docs for full details: Cilium Gateway API docs.
A screenshot of a Cilium documentation webpage showing a "Prerequisites" section that lists configuration requirements and CRDs for the Gateway API, with a left-hand navigation menu and several links. A teal cursor arrow is visible pointing at one of the bullet points.
Cilium expects the experimental Gateway API CRDs in many environments because they include TCPRoute/TLSRoute/UDPRoute support. Install the experimental release to avoid missing-CRD errors. Install the experimental Gateway API CRDs (example):
You should see CRDs created; trimmed expected output:
Verify CRDs are present:
Cilium requires either nodePort.enabled=true (Cilium NodePort implementation) or kubeProxyReplacement=true. This prerequisite is also required when enabling ingress support in Cilium. Pick one of these two options in your Helm values.

Enable Gateway API support in Cilium (Helm)

Update Cilium Helm values to enable Gateway API support. Example snippet from values.yaml:
To enable Gateway API (and optionally enable kube-proxy replacement), run:
Restart the operator and agents so they pick up the new configuration:
Check Cilium status:
After rollout, the Cilium controller will create a GatewayClass for you. Confirm with:
Expected:

Demo applications and services (what to expose)

This demo deploys three apps and a default catch-all backend: Apply the following YAML manifests in your cluster (examples below). Each block contains a Deployment + ClusterIP Service. ecom-products deployment + service:
ecom-carts deployment + service:
blog deployment + service:
default backend (nginx) deployment + service:
Verify deployments and services:
You should see the ClusterIP services for each demo app.

Create the Gateway

Create a Gateway that uses the Cilium GatewayClass and listens on HTTP port 80. Save as gateway.yaml:
Apply:
Check gateway status:
Example output:
When the Gateway is created, Cilium automatically creates a LoadBalancer-type Service named cilium-gateway-<gateway-name>. That Service exposes an EXTERNAL-IP you can point DNS at:
Example snippet:
Use that EXTERNAL-IP (172.19.255.92 in the example) for DNS records or /etc/hosts entries when testing.

Create HTTPRoute resources

Create an HTTPRoute that attaches to the Gateway and maps host/path combinations to backend services. Save as httproute.yaml:
Apply the HTTPRoute:
Verify the HTTPRoute and inspect details:

Test routes (DNS / hosts + curl)

For local testing, add /etc/hosts entries that map the demo hostnames to the gateway EXTERNAL-IP:
Then test with curl:
Example snippet from the default nginx page (trimmed):
Seeing the correct JSON responses and the nginx default page confirms that the Gateway + HTTPRoute configuration is forwarding traffic as expected.

Troubleshooting tips

  • Ensure Gateway API CRDs were installed (use the experimental manifest if you need TCP/TLS/UDP routes).
  • Verify Cilium has gatewayAPI.enabled=true in its Helm values and that you restarted the operator/agents after upgrading.
  • Confirm the gateway service (cilium-gateway-<name>) has an EXTERNAL-IP and that DNS or /etc/hosts points to that IP.
  • Inspect Gateway and HTTPRoute resources for events and status:
    • kubectl describe gateway my-gateway
    • kubectl describe httproute my-routes
  • Check Cilium logs and controller events if the GatewayClass or Gateway is not being programmed.

Watch Video