<p>I have setup a Kubernetes cluster with flannel network on bare metal. I have a service deployed and running in the cluster. The service would broadcast to discover the other end devices in the same subnet. </p>

<p>The problem is that the client agents which receives the broadcasts are running on resource-constrained hardware. These devices are running in the same subnet with the Master and Worker Nodes. The deployed service in pods (netmask: 10.244.0.0/16) are unable to discover the clients running in the Host OS subnet (netmask: 192.168.0.0/24). How to join the clients in the pods' subnet?</p>

<p>Any help is appreciate. </p>

<p>I ended up making the host and pods running in the same subnet by adding <code>hostNetwork: true</code> in pod configuration.  In that case, containers are using host network. Inspired from <a href="https://github.com/kubernetes/kubernetes/issues/19171" rel="nofollow noreferrer">here</a></p>

<p>The configuration looks like:</p>

<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
 name: worker
 namespace: default
spec:
 replicas: 4
 selector:
   name: worker
 template:
   metadata:
     labels:
       name: worker
 spec:
    hostNetwork: true
    containers:
       - image: 10.0.0.1:5000/worker
         name: worker
         imagePullPolicy: IfNotPresent
</code></pre>
