<p>We have an app that uses UDP broadcast messages to form a &quot;cluster&quot; of all instances running in the same subnet.</p>
<p>We can successfully run this app in our (pretty std) local K8s installation by using <code>hostNetwork:true</code> for pods. This works because all K8s nodes are in the same subnet and broadcasting is possible. (a minor note: the K8s setup uses flannel networking plugin)</p>
<p>Now we want to move this app to the managed K8s service @ AWS. But our initial attempts have failed. The 2 daemons running in 2 different pods didn't see each other. We thought that was most likely due to the auto-generated EC2 worker node instances for the AWS K8s service residing on different subnets. Then we created 2 completely new EC2 instances in the same subnet (and the same availability-zone) and tried running the app directly on them (not as part of K8s), but that also failed. They could not communicate via broadcast messages even though the 2 EC2 instances were on the same subnet/availability-zone.</p>
<p>Hence, the following questions:</p>
<ul>
<li><p>Our preliminary search shows that AWS EC2 does probably not support broadcasting/multicasting, but still wanted to ask if there is a way to enable it? (on AWS or other cloud provider)?</p>
</li>
<li><p>We had used <code>hostNetwork:true</code> because we thought it would be much harder, if not impossible, to get broadcasting working with K8s pod-networking. But it seems some companies offer K8s network plugins that support this. Does anybody have experience with (or recommendation for) any of them? Would they work on AWS for example, considering that AWS doesn't support it on EC2 level?</p>
</li>
<li><p>Would much appreciate any pointers as to how to approach this and whether we have any options at all..</p>
</li>
</ul>
<p>Thanks</p>

murtiko
<p>Conceptually, you need to create overlay network on top of the VPC native like <a href="https://aws.amazon.com/articles/overlay-multicast-in-amazon-virtual-private-cloud/" rel="nofollow noreferrer">this</a>. There's a <a href="https://github.com/k8snetworkplumbingwg/multus-cni" rel="nofollow noreferrer">CNI</a> that support multicast and here's the AWS <a href="https://aws.amazon.com/blogs/containers/amazon-eks-now-supports-multus-cni/" rel="nofollow noreferrer">blog</a> about it.</p>
