Milen Tsvetkov
Milen Tsvetkov

Reputation: 23

GKE VPN to on-premise database

My question here is maybe simple but I'm missing something. I have a GKE cluster and I want to connect it to an on-premise database. GKE - VPC-native cluster GKE version - 1.17.15-gke.800 POD ip range - 10.0.0.0/14
SERVICES ip range - 10.4.0.0/20

I have a cloud VPN working (policy based connection) and I have a connection from Google's network to the onpremise network. I've tested it from a test instance and from the instances of the GKE cluster. I don't have connection only from the pods. What am I missing here ?

Upvotes: 0

Views: 654

Answers (1)

Milen Tsvetkov
Milen Tsvetkov

Reputation: 23

I managed to find the right answer:

Egress traffic from GKE Pod through VPN

Got it from here, I needed to enable Network Policy for master + nodes and then used the ip-masq-agent config to create a Configmap, then you must delete the pods of ip-masq-agent and when they come up with the new config everything is working fine.

Upvotes: 1

Related Questions