Is it appropriate to run one kubernetes cluster for two datacenters

5/9/2016

Environment background

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

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.

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.

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.

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.

-- FeatherKing
kubernetes

1 Answer

5/10/2016

I believe you're looking for Cluster Federation (a.k.a. "Ubernetes"). This feature is under active development, but exists as of 1.2 in a "lite" form: see the documentation 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.

-- Tim Allclair
Source: StackOverflow