简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM