Sign in →
CloudLab Works emblem: Waku the orca ringed by CloudLab and WorksAgenticCLOUDLAB WORKScrossed whale bones, one end a wrenchCloud City, headwaters of the agentic cloud revolution!
Waku, the orca wearing a headset Ask Me

Invisible Wires: Agentic Cloud

The service answered, the ingress said no: running Knative on Cilium's Gateway API

· By Alex Alvord

$ 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?"

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:

CheckResult
Request through the GatewayHTTP 200
Scale to zero0 pods after 96 s idle
Cold start from zero pods1.31 s (image already on the node)
Warm request0.007 s
Knative system footprintabout 88 MiB of memory across six pods
New load-balancer addresses usednone

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.

Comments

  1. Loading comments…

Comments are read by Alex before they appear. No email address needed; your name shows as you type it. See privacy.

← All posts

Ask Waku