Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mounting Google Cloud network locally

We have a Google Cloud project with several VM instances and also Kubernetes cluster.

I am able to easily access Kubernetes services with kubefwd and I can ping them and also curl them. The problem is that kubefwd works only for Kubernetes, but not for other VM instances.

Is there a way to mount the network locally, so I could ping and curl any instance without it having public IP and with DNS the same as inside the cluster?

like image 519
Vojtěch Avatar asked Nov 07 '22 23:11

Vojtěch


1 Answers

I would highly recommend rolling a vpn server like openvpn. You can also run this inside of the Kubernetes Cluster.

I have a make install ready repo for ya to check out at https://github.com/mateothegreat/k8-byexamples-openvpn.

Basically openvpn is running inside of a container (inside of a pod) and you can set the routes that you want the client(s) to be able to see.

I would not rely on kubefwd as it isn't production grade and will give you issues with persistent connections.

Hope this help ya out.. if you still have questions/concerns please reach out.

like image 74
yomateo Avatar answered Nov 15 '22 09:11

yomateo