<p>I'am searching on how to send multicast udp packet to pods in my kubernetes cluster</p>

<p>after some investigation in this issue  i realized that  all my pods can see packet only if it running on the same node other pods that living on another node can't see the routed packet,</p>

<p>i have test it on my <a href="https://cloud.google.com/" rel="nofollow noreferrer">gcp</a> account , i haven't test it on any other k8s cloud providers
i have implement it using java spring boot integration see my <a href="https://github.com/ashraf-revo/megana" rel="nofollow noreferrer">git repo</a></p>

<p>i have implemented two modules </p>

<pre><code>    &lt;modules&gt;
        &lt;module&gt;livefeed&lt;/module&gt; #read packet on the network on 4444 port
        &lt;module&gt;livesender&lt;/module&gt; # multicast 1 packet every 1 second
    &lt;/modules&gt;
</code></pre>

<p>i have made my deployment kind <code>DaemonSet</code> to make sure kubernetes schedule every pod on different node </p>

<p>i am using spring integration to read routed packet as <code>
    @Bean
    public IntegrationFlow processUniCastUdpMessage() {
        return IntegrationFlows
                .from(new MulticastReceivingChannelAdapter("224.0.0.1", 4444))
                .handle(x -&gt; log.info(new String(((byte[]) x.getPayload()))))
                .get();
    }</code></p>

<p>I hope someone can help me if should i configure vpn on gcp or something else. </p>

<p>See <a href="https://stackoverflow.com/questions/48304357/multicast-traffic-to-kubernetes">this thread</a>, you need to configure your kubernetes cluster to add the following config for multicasting to function correctly:</p>

<pre><code>hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
</code></pre>

<p>Hope this helps.</p>
