I need to capture multicast traffic in Kubernetes clusters with latency as close to the host network as possible. I'm considering hostNetwork, macvlan, and ipvlan, but I'm also interested in other approaches that might work. One complication is that users will dynamically create workloads, so requiring every multicast-enabled Pod to use hostNetwork may not be practical. What networking setups would you recommend?
2 Answers
Consider using Multus to attach a secondary network interface to the Pod. In our setup, a primary CNI handles normal Kubernetes networking while a secondary CNI provides the multicast-capable interface. Kube-OVN combined with Multus is one configuration that can support this pattern, depending on the underlying network and multicast requirements.
hostNetwork is generally the simplest option and should provide the lowest latency because the Pod uses the node’s network stack directly. A host-device interface through the CNI is another possibility, but it’s usually limited to one Pod per interface or device, so it may not scale well for dynamically created workloads.

That’s the main issue for us. We’re planning to let users launch workloads through a Kubernetes-based development tool, so we can’t reliably require or reserve hostNetwork for every workload that might need multicast.