Is it possible to join two separate kubernetes clusters?

10/4/2018

I have deployments on one Kubernetes cluster that I might want to move to another Kubernetes cluster in the future. Is it possible to combine these two clusters or must I redeploy everything? If the answer is yes, what if there are StatefulSets?

-- Mike
kubernetes

1 Answer

10/4/2018

The short answer is no.

You can connect to clusters with something like Kubernetes Federation or if you have Calico, you can use something like BGP peering

You'll have to redeploy everything and in the case of StatefulSets, it really depends where you are storing your state. For example:

  • Is it MySql? Backup your db and restore it in the new place.
  • Is it Cassandra? Can you reattach the same physical volumes in the cloud provider? if not, then you'll have to transfer your data.
  • Is it etcd, Consul or Zookeeper? Can you back it up or attach the same physical volumes?
-- Rico
Source: StackOverflow