I'm trying to connect an already existing GKE cluster to a Mongo Cluster in mongo atlas.
I followed this tutorial, with the only difference that I didn't create the GKE cluster after creating the peering, but the other way around: I created the GKE Cluster, and then, when I saw I needed the peering, I peered the VPC in which the GKE Cluster was deployed, to mongo.
Then I tried the following
kubectl run -i --tty mongo-test --image=mongo --restart=Never -- sh
and then mongosh <<myconnectionurl>>
, but it fails with a timeout.
I fear the peering needs to be done BEFORE creating the GKE cluster, which would be extremely undesirable for me. Note that VPC-native traffic routing is enabled in said GKE Clustter.