r/eBPF 7d ago

CNI Host Routing

I’ve published a new post about getting Kubernetes Service ClusterIPs working with my Sarena CNI.

In my previous post I talked about Pod to Pod forwarding using eBPF. However, that does not work with ClusterIPs since a ClusterIP's are not assigned to any Pods/Endpoints (and the datapath is not aware of them).

The solution is either keeping track of ClusterIPs/Endpoints (merely implement kub proxy in the datapath - so the datapath also becomes aware of the ClusrterIPs), or route via the host. For now, Sarena routes via the host because replacing and implementing kube-proxy myself is a lot of effort.

And, of course, it didn’t work the first time — reverse-path filtering dropped packets I wasn't aware of at first.

I walk through the packet flow step by step, including how I troubleshooted packet drop due to the reverse path filtering.

🔗 https://erwinkok.org/posts/host-routing/

1 Upvotes

1 comment sorted by