Skip to content

perf(networking): make Cilium native routing (eBPF) the default — resolve the worker-bootstrap deadlock #805

Description

@rustyrazorblade

Goal

Make Cilium native routing (eBPF host routing) the default CNI datapath, replacing the current VXLAN tunnel mode, to remove the encapsulation overhead — the whole point of running Cilium/eBPF.

Current state

services/CiliumService.kt installs Cilium 1.19.4 with tunnelProtocol=vxlan + routingMode=tunnel (VXLAN encapsulation). Per the in-code rationale, native routing was avoided because Cilium's eBPF intercepts the K3s agent's outbound TCP to the API server during bootstrap → i/o timeout → worker-node bootstrap deadlock. VXLAN keeps host-to-host traffic outside eBPF interception and sidesteps it, at the cost of datapath performance. The install already points agents directly at the API server (k8sServiceHost/k8sServicePort), which alone did not resolve the deadlock.

Work

  • Determine the native-routing config that bootstraps cleanly on K3s (candidates: routingMode=native + autoDirectNodeRoutes, bpf.hostLegacyRouting, kubeProxyReplacement, cni.exclusive=false, install ordering, etc.).
  • Verify on a live multi-node cluster (control + ≥1 db-node worker) that the worker agent bootstraps and pod↔pod / pod↔service networking works under native routing.
  • Flip the default in CiliumService.kt from VXLAN tunnel to native routing; keep/adjust tests.

Acceptance criteria

  • WHEN a cluster is provisioned with the default config, THEN Cilium runs in native routing mode (no VXLAN encapsulation) AND all worker-node K3s agents bootstrap to Ready without the API-server i/o-timeout deadlock.
  • WHEN native routing is active, THEN pod-to-pod and pod-to-service traffic works across nodes (verified: a pod on the db node reaches a service/pod on the control node and vice versa).
  • Observability (Hubble) and the rest of the stack still function.

Notes

  • Highest priority. Ephemeral clusters — no migration concern. Never disable functionality to work around the deadlock; fix the bootstrap ordering/config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Priority 1 — highenhancementNew feature or requeststatus:in-progressBackground team implementing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions