Kubernetes clusters are flat by default. Every pod talks to every other pod across nodes with zero encryption. That works fine inside a trusted VPC, but it collapses the moment traffic crosses cloud boundaries, on-prem edges, or untrusted networks. WireGuard solves the encryption piece. Cilium solves the identity and policy piece. Together they give you a zero-trust mesh without the weight of a full service mesh sidecar.
Why WireGuard in the Dataplane
WireGuard runs in kernel space, uses modern AEAD ciphers (ChaCha20-Poly1305), and adds roughly 60 bytes of overhead per packet. Compared to IPsec or userspace TLS proxies, latency stays sub-millisecond and CPU stays low. Cilium 1.13+ wires this directly into its eBPF datapath: when you enable encryption: wireguard, Cilium generates keys per node, distributes them via the Kubernetes API, and programs the WireGuard interface (cilium_wg0) into the host network namespace. No daemon set, no extra container, no manual key rotation.
Identity-Driven Policy, Not IP CIDRs
Traditional VPNs authorize by source IP. Cilium authorizes by Kubernetes identity labels. A CiliumNetworkPolicy can say "allow traffic from pods labeled app=payments to app=ledger on port 443" and the encryption decision follows the identity, not the node IP. If a pod reschedules to a new node, the policy moves with it. The WireGuard tunnel is always node-to-node, but the authorization is pod-to-pod.
Cross-Cluster and Hybrid Mesh
Cilium Cluster Mesh stitches multiple Kubernetes clusters into a single logical network. Enable WireGuard on each cluster, peer the Cluster Mesh via cilium clustermesh enable, and you get encrypted connectivity across clouds, regions, or on-prem data centers. The same identity model applies: a pod in AWS EKS talks to a pod in a bare-metal OpenShift cluster with zero config change.
"We replaced a 12-node IPsec mesh with Cilium WireGuard and cut tail latency by 40% while dropping the ops runbook from 30 pages to 3.
— Platform Lead, Fintech Unicorn
Operational Gotchas
| Issue | Mitigation |
|---|---|
| UDP 51820 blocked by SG/firewall | Open inbound/outbound on all node SGs |
| MTU mismatch causes fragmentation | Set <code>mtu: 1420</code> in CiliumConfig or ensure 1500 end-to-end |
| Key rotation stalls on large clusters | Upgrade to Cilium 1.15+ for parallel key distribution |
| IPv6 pods need dual-stack WireGuard | Enable <code>enable-ipv6: true</code> and <code>wireguard.ipv6</code> |
Observability Without Sidecars
Because encryption lives in the eBPF datapath, Hubble sees cleartext headers for flow logs, metrics, and service maps. You get golden signals (latency, error rate, throughput) per identity without injecting a proxy. Enable Hubble Relay and Grafana dashboards to alert on encryption failures, key rotation lag, or policy drops.
✦
Ship It Checklist
1. Upgrade kernel to 5.10+ on all nodes (WireGuard backport exists for 5.4 but avoid). 2. Apply the CiliumConfig above via Helm values or cilium config set. 3. Verify cilium status shows Encryption: WireGuard and Key Rotation: OK. 4. Run cilium encrypt status to confirm peer keys. 5. Deploy a test workload across zones and capture a pcap on cilium_wg0 — you should see only UDP 51820 with encrypted payloads. 6. Add Cluster Mesh if you run multi-cluster. 7. Document the UDP port and MTU in your runbook.










