Invisible Wires: Agentic Cloud
The service answered, the ingress said no: running Knative on Cilium's Gateway API
$ curl -H "Host: hello.knative-demo.lab" http://192.168.1.5/
Hello Knative on Cilium Gateway! HTTP 200 1.31 s (cold start from zero pods)
That response came back long before Knative agreed it should. For one attempt, the same request returned 200 while every Knative ingress sat at Ready=Unknown. The service answered. The control plane said no.
The whole system first
client --Host: hello.knative-demo.lab--> 192.168.1.5 (MetalLB)
--> Cilium Gateway "lab-gw" (Envoy, GatewayClass cilium)
--> HTTPRoute written by net-gateway-api
--> Knative activator / revision pods (scale to zero)
net-gateway-api readiness prober --?--> "where is the gateway?"
- Cluster: kubeadm Kubernetes v1.37.2, three control-plane nodes: two arm64 Turing RK1 modules and one amd64 VM.
- Networking: Cilium 1.20.4 with kube-proxy replacement, and Cilium as the GatewayClass. One Gateway on one address serves every web UI by hostname.
- Knative: Serving and net-gateway-api, both v1.24.0, installed from the release YAML with checksums verified. Every Knative image ships an arm64 build.
Why this was a test, not an install
net-gateway-api is Knative's bridge to the Kubernetes Gateway API. Its own test notes list Istio, Contour and Envoy Gateway. Cilium is not on the list. So the install was run as a spike with a pass line written first: a request through the Gateway returns 200, the service scales to zero when idle, and the next request wakes it.
The mystery
Following the documented configuration, each gateway entry named its backing Kubernetes Service. The result:
failed to probe Ingress: failed to get endpoints:
endpoints "cilium-gateway-<name>" not found
Traffic flowed. Readiness failed. That split points at the readiness check, not the data path.
Reading the source
The prober lives in pkg/reconciler/ingress/lister.go at the v1.24.0 tag. When a gateway entry names a Service, the prober asks Kubernetes for that Service's Endpoints object (the older core/v1 API) and probes the addresses inside it.
Cilium's per-Gateway Service has no selector and no Endpoints object. Cilium writes only an EndpointSlice, the newer API, holding a placeholder address:
$ kubectl -n gateway get endpoints cilium-gateway-lab-gw
Error from server (NotFound): endpoints "cilium-gateway-lab-gw" not found
$ kubectl -n gateway get endpointslices
NAME ADDRESSTYPE PORTS ENDPOINTS
cilium-gateway-lab-gw IPv4 9999 192.192.192.192
Two problems in one object. The prober looks for a kind of record Cilium never creates, and the record Cilium does create points at an address nothing listens on. An earlier report on Cilium 1.17 (net-gateway-api issue #817) hit the placeholder address directly and was closed as stale with no fix.
The fix
The same function has a second path. When no Service is named, the prober reads the Gateway's own status.addresses and probes that address on port 80. Cilium fills that field correctly. Removing one key per gateway entry:
external-gateways: |
- class: cilium
gateway: gateway/lab-gw
supported-features: [HTTPRouteRequestTimeout]
Every Knative ingress went Ready. The pass test then ran end to end:
| Check | Result |
|---|---|
| Request through the Gateway | HTTP 200 |
| Scale to zero | 0 pods after 96 s idle |
| Cold start from zero pods | 1.31 s (image already on the node) |
| Warm request | 0.007 s |
| Knative system footprint | about 88 MiB of memory across six pods |
| New load-balancer addresses used | none |
The trade-off
Knative normally runs a second, cluster-local Gateway for internal-only services. On Cilium that Gateway needs its own load-balancer address: Cilium's Gateway configuration accepts LoadBalancer or NodePort service types, not ClusterIP, and a NodePort Gateway advertises node addresses the prober cannot reach on port 80. With no spare address, both entries point at the one Gateway. Services marked cluster-local stay reachable from the LAN with the right Host header. For a LAN-only lab that is acceptable. It is recorded, not hidden.
Upstream
The finding is filed as net-gateway-api issue #1006: the error, the source path, the config that works, the cluster-local limitation, and two suggestions. Document the no-Service configuration for Cilium, and fall back to the Gateway's addresses when no Endpoints object exists. The older Endpoints API is also deprecated in current Kubernetes, which gives the second suggestion a reason beyond Cilium.
What the spike does not claim
No TLS yet, single replicas, no conformance suite run on Cilium, and cold start measured with the image already cached. Those are the next tests, not footnotes.
Follow along
Get the next post without leaving this page: copy the feed into any reader, or get it by email. Live builds and the lab's music stream on Twitch.
Comments