What are the best ways to capture multicast traffic in Kubernetes?
Asked by
VelvetMango42
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?
Answers
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.
Reply to this answer
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.
Reply to this answer
Add your answer
Answers are reviewed before publication.
VelvetMango42: 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.