How to host kubernetes cluster on VPN comprising of VM's from different cloud providers

4/29/2020

What I am trying to accomplish here is, create a k8s cluster but the worker & master nodes are in different cloud.
Example, I have a VM instance in AWS & another one in GCP.
I can't use them as master & worker node because they are not on the same network range.

My question, is it be possible to create a VPN which comprises of these machines & then host a k8s cluster on top of it so that I can use different machines in different cloud as my worker/master nodes.
Or there is some fundamental flaw in my understanding of k8s

I don't want to use IP-Sec or DRG which are not part of free tier to achieve this.

-- Always a newComer
amazon-ec2
google-cloud-platform
kubernetes
openvpn

1 Answer

4/29/2020

A number of Kubernetes Container Network Interface (CNI) plugins support overlay networks. An overlay network creates tunnels on a real network for the k8s nodes to communicate across physical subnets on what appears like a local interface.

There are a number of issues you will need to tackle with a geographically disperse cluster.

  • How you schedule you application across the cluster appropriately.
  • How the nodes communicate with masters.
  • How your etcd cluster is structured.

The common solution to these problems is to run multiple clusters in each geo location and traffic manage them.

-- Matt
Source: StackOverflow