How to expose kubernetes service from bare metal cluster
<p>I run a kubernetes cluster on a 'bare metal' Ubuntu machine, as described here <a href="http://kubernetes.io/docs/getting-started-guides/ubuntu/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/ubuntu/</a>. After I create a LoadBalancer service, I can see on which ip address it runs: </p>

<pre><code>kubectl describe services sonar
Name:           sonar
IP:             10.0.0.170
Port:           &lt;unset&gt; 9000/TCP
Endpoints:      172.17.0.2:9000
. . .  
</code></pre>

<p>Then I expose this to the world with nginx running outside of the kubernetes cluster. Great, but on the next service deployment the ip changes. How can I deal with this? Fix the ip, use environment vars, any other way?</p>