<h2>Environment background</h2>

<ul>
<li>I currently have two vmware datacenters</li>
<li>Kubernetes 1.2.2 running on
coreos</li>
<li>In datacenter 'L', I have a kubernetes cluster of 3 masters
and 5 minions</li>
<li>In datacenter 'O', I was planning on standing 5
minions only</li>
<li>etcd is running on the 3 kubernetes masters</li>
<li>In both datacenters I would have production and
development pods</li>
<li>dns addon is running in my cluster</li>
</ul>

<p>I have been using kubernetes over the last month. Ive read about labels, namespaces and selectors, but I am confused on the best design approach for my environment. Right now I have a 'dev' namespace and a 'prod' namespace. That works fine to split the prod and dev pods. But when I involve another datacenter it gets complicated for me.</p>

<p>Lets say in both datacenters I would like to run a rabbitmq instance in a dev namespace. Its tricky because I wouldnt want resin in datacenter 'O' connecting to the 'L' rabbitmq instance over the WAN. I could add a label to all nodes in each datacenter and make two rabbitmq pods with logic to select a node in each datacenter. But if I was to stand up a dev resin pod, I would want that pod to connect to the rabbitmq instance in the same datacenter as the pod.</p>

<p>I considered maybe making a pod template for each datacenter: resinO, resinL and having them respectively connect into a service of similar name rabbitmqO or rabbitmqL.</p>

<p>I just didnt want to go too far down this path if there is a kubernetes feature that may help me and I have over looked it.</p>

<p>I believe you're looking for <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/federation.md" rel="nofollow">Cluster Federation</a> (a.k.a. "Ubernetes"). This feature is under active development, but exists as of 1.2 in a "lite" form: see <a href="http://kubernetes.io/docs/admin/multiple-zones/" rel="nofollow">the documentation</a> for more details. However, as the documentation states, the current version cannot span clouds or regions, so will probably not work for your use case.</p>
