Kubernetes & Networking · November 24, 2026
How to Configure Cilium eBPF with Kubernetes Gateway API: Production Guide [2026]
TL;DR // Quick Answer
To run Cilium eBPF with Kubernetes Gateway API in production, install the standard Gateway API CRDs first, deploy Cilium with kubeProxyReplacement=true and gatewayAPI.enabled=true, then replace legacy Ingress annotations with typed Gateway and HTTPRoute manifests enforced directly in the eBPF datapath.
For years, Kubernetes teams relied on ingress-nginx and kube-proxy iptables chains to route external traffic into cluster workloads. At scale—especially in latency-sensitive fintech and multi-tenant SaaS clusters—that legacy stack creates two persistent bottlenecks: O(n) iptables rule evaluation overhead and brittle, vendor-locked Ingress annotations.
Combining Cilium eBPF with the Kubernetes Gateway API solves both problems. Cilium replaces kube-proxy with kernel-level eBPF hash maps while natively implementing the role-oriented Gateway and HTTPRoute controllers.
1. Prerequisites & CRD Installation
Cilium requires the official Kubernetes Gateway API CRDs to exist in the cluster before the Cilium operator boots with Gateway API enabled.
# Install standard Gateway API v1.2+ CRDs
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml
# Optional: add TLSRoute if you need SNI passthrough for databases or mTLS services
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.1/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
Verify the CRDs are established:
kubectl get crd | grep gateway.networking.k8s.io
2. Production Cilium Helm Configuration
Enable kubeProxyReplacement and gatewayAPI in your Helm values. On bare-metal or Proxmox clusters without a cloud LoadBalancer, pair this with Cilium's built-in L2 Announcements or BGP Control Plane.
# cilium-values.yaml
kubeProxyReplacement: true
k8sServiceHost: "10.0.10.10" # Replace with your API server VIP / endpoint
k8sServicePort: 6443
gatewayAPI:
enabled: true
enableAlpn: true
enableAppProtocol: true
envoy:
enabled: true
prometheus:
enabled: true
hubble:
enabled: true
relay:
enabled: true
metrics:
enableOpenMetrics: true
enabled:
- dns
- drop
- tcp
- flow
- httpV2:exemplars=true;labelsContext=source_ip,source_namespace,source_workload,destination_ip,destination_namespace,destination_workload
Apply the release and restart the operator if upgrading an existing cluster:
helm upgrade --install cilium cilium/cilium \
--namespace kube-system \
--values cilium-values.yaml
kubectl -n kube-system rollout restart deployment/cilium-operator
kubectl -n kube-system rollout restart ds/cilium
Confirm Cilium registered the cilium GatewayClass:
kubectl get gatewayclass cilium
3. Defining the Cluster Gateway (Platform Team)
Unlike legacy Ingress, the Gateway API separates infrastructure listeners and TLS certificates (Gateway) from application routing rules (HTTPRoute).
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: prod-edge-gateway
namespace: platform-edge
spec:
gatewayClassName: cilium
listeners:
- name: http-redirect
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: Same
- name: https-edge
protocol: HTTPS
port: 443
hostname: "*.example.com"
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: wildcard-example-tls
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
edge-access: "enabled"
4. Application Routing & Canary Splits (App Teams)
Developers attach HTTPRoute resources to the shared Gateway without touching TLS keys or load-balancer annotations. Weighted traffic splitting for canary releases is native to the spec:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: payments-api-route
namespace: payments
spec:
parentRefs:
- name: prod-edge-gateway
namespace: platform-edge
sectionName: https-edge
hostnames:
- "api.example.com"
rules:
- matches:
- path:
type: PathPrefix
value: /v2/payments
backendRefs:
- name: payments-api-stable
port: 8080
weight: 90
- name: payments-api-canary
port: 8080
weight: 10
timeouts:
request: "10s"
backendRequest: "5s"
5. Production Validation Checklist
Before cutting over DNS from legacy Ingress NGINX to Cilium Gateway API:
- Verify L4/L7 eBPF status: Run
cilium statusand confirmKubeProxyReplacement: TrueandEnvoydaemonset healthy. - Test HTTP-to-HTTPS redirect: Attach a dedicated
HTTPRoutewith aRequestRedirectfilter on the port 80 listener. - Validate Hubble telemetry: Ensure Prometheus is scraping
hubble_http_requests_totalandenvoy_http_downstream_rq_xxfor p95/p99 latency visibility. - Enforce CiliumNetworkPolicy: Lock down backend pods so they only accept traffic from the Envoy/Gateway identity rather than arbitrary cluster namespaces.
If your team is planning a zero-downtime migration off ingress-nginx or hardening Kubernetes networking for regulated workloads, see our Infrastructure, DevOps & SRE consulting services or review our multi-service production infrastructure case study.
FAQ // Key Questions
Frequently Asked Questions
Do I need kube-proxy replacement enabled to use Cilium Gateway API?+
Yes. Cilium Gateway API requires kubeProxyReplacement=true so Cilium can handle North-South load balancing, NodePort/LoadBalancer service routing, and socket-level redirection directly in eBPF.
Which Gateway API CRDs must be installed before enabling Cilium Gateway API?+
Install the official Kubernetes Gateway API CRDs (GatewayClass, Gateway, HTTPRoute, ReferenceGrant, and TLSRoute/GRPCRoute if needed) before installing or upgrading the Cilium Helm release, or the Cilium operator will fail to register the Gateway controller.
How does Cilium Gateway API compare to Ingress NGINX in latency and maintainability?+
Cilium Gateway API eliminates fragile vendor-specific Ingress annotations, separates cluster-operator Gateway ownership from developer HTTPRoute ownership, and avoids iptables traversal overhead by routing traffic through eBPF maps.
Related Notes
Docker & Kubernetes · Nov 18, 2026
CVE-2026-65960: Securing Cilium Tetragon eBPF gRPC Endpoints
Cilium Tetragon before v1.7.0 exposes unauthenticated gRPC admin APIs on localhost:54321. Here is how SRE and DevSecOps teams can mitigate CVE-2026-65960.
Docker & Kubernetes · Oct 26, 2026
Cilium 1.20: Gateway API v1.6 & eBPF Datapath Scale
Cilium 1.20 advances Kubernetes networking with Gateway API v1.6, netkit integration, and scalable sidecarless mTLS for multi-tenant clusters.
