<p>I'm using a cluster setup with multiple apiservers with a loadbalancer in front of them for external access, with an installation on bare metal.</p>

<p>Like mentioned in the <a href="http://kubernetes.io/v1.0/docs/admin/high-availability.html" rel="noreferrer">High Availability Kubernetes Clusters</a> docs, I would like to use internal loadbalancing utilizing the <code>kubernetes</code> service within my cluster. This works fine so far, but I'm not sure what is the best way to set up the <code>kube-proxy</code>. It obviously cannot use the service IP, since it does the proxying to this one based on the data from the apiserver (<code>master</code>). I could use the IP of any one of the apiservers, but this would cause losing the high availability. So, the only viable option I currently see is to utilize my external loadbalancer, but this seems somehow wrong.</p>

<p>Anybody any ideas or best practices?</p>

<p>This is quite old question, but as the problem persists... here it goes.</p>

<p>There is a bug in the Kubernetes restclient, which does not allow to use more than one IP/URL, as it will pick up always the first IP/URL in the list. This affects to kube-proxy and also to kubelet, leaving a single point of failure in those tools if you don't use a load balancer (as you did) in a multi-master setup. The solution probably is not the most elegant solution ever, but currently (I think) is the easier one.</p>

<p>Other solution (which I prefer, but may not work for everyone and it does not solve all the problems) is to create a DNS entry that will round robin your API servers, but as pointed out in one of the links below, that only solves the load balancing, and not the HA.</p>

<p>You can see the progress of this story in the following links:</p>

<p>The kube-proxy/kubelet issue: <a href="https://github.com/kubernetes/kubernetes/issues/18174" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/18174</a><br>
The restclient PR: <a href="https://github.com/kubernetes/kubernetes/pull/30588" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/30588</a><br>
The "official" solution: <a href="https://github.com/kubernetes/kubernetes/issues/18174#issuecomment-199381822" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/18174#issuecomment-199381822</a></p>
