<p>I have a 3-node Kubernetes cluster setup with Vagrant/Virtualbox. I am setting up a 4th VM that is not attached to the cluster.</p>

<p>I want to configure my 4th node so that it routes all traffic in the Service IP CIDR to a node on the Kubernetes cluster. The specific node doesn't matter since once traffic hits a node it will route to the correct pod as I expect.</p>

<p>For example, let's say I deploy a Rabbit broker on my k8s cluster behind a Service with IP <code>10.0.0.5</code> and my cluster service CIDR is <code>10.0.0.0/24</code>. On my 4th VM, I set up a python script to publish messages to <code>10.0.0.5</code>. However, <code>10.0.0.5</code> is virtual since it is a Service ClusterIP and therefore doesn't know how to route. I want to add a routing rule to automatically send <code>10.0.0.0/24</code> traffic to any of the 3 nodes in my cluster.</p>

<p>Can anyone help me out?</p>

bfink
<p>Although you might be able to make routing working with <a href="http://linux-ip.net/html/routing-tables.html" rel="nofollow noreferrer">route tables</a> and <a href="https://en.wikipedia.org/wiki/Iptables" rel="nofollow noreferrer">iptables</a>, I would recommend using a <a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer">NodePort</a> type of service so that you talk to the IP address of your nodes and not a Virtual IP that is only available within the cluster.</p>
