Question

Connect a managed Kubernetes to a on-premise company VPN

We want to use, in our DO K8S cluster, some services running on premise behind our company VPN.

Our approach is to use VPC gateway for all outbound traffic, as described here: https://www.digitalocean.com/docs/networking/vpc/resources/droplet-as-gateway/ This works fine for normal droplets.

But I’m not sure how to configure the gateway for the k8s worker nodes. Any recommendations?

Thanks in advance.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I been testing something similar by creating a DO K8S pod that had it services behind on-premise network.

This permits me to present a on-premise service as if it was part of a DO K8S pod. This is done by running a pod with a Wireguard tunnel and a nat rule withing the wireguard configuration.

This way the on-prem service is presented to DO K8S as if it was any other pod deployed on your cluster.

Here a deployment example, showing a on-prem website been presented as if it was a native DO K8S pod instance:

https://gist.github.com/hcgonzalezpr/b4d0966183e97e7410ace9e00448a6c5

@user2342,

Were you able to find any solution for this? We are also stuck trying to make this work.