Multi-cloud vpc peering ( AWS, GCP )

I distributed mongodb cluster. aws should also connect to mongodb through k8s and gcp should also connect to mongodb through k8s. At this time, aws and gcp were “vpc peering” with mongoDB, but only k8s of aws are connected to mongodb and not gcp k8s.

What should I do?

Connection via app is only available on aws and gcp gets a “ReplicaSetNoPrimary” error

Hi @Dan_Lee,

Trying to understand / get some clarification on this one a bit more.

Could you advise the following details?:

  1. If you have a k8s environment (application side) on AWS attempting to connect to the MongoDB Atlas cluster
  2. If you have a k8s environment (application side) on GCP attempting to connect to the MongoDB Atlas cluster
  3. If the Atlas cluster is a single region cluster
  4. If the Atlas cluster is a multi-cloud cluster. If so:
    • For what cloud providers
    • How many nodes per cloud provider
  5. How many VPC peering connections you have set up to the Atlas cluster.

Also, not sure if it may be relevant for this specific scenario without further information, but as per the Network Peering documentation:

Atlas does not support Network Peering between clusters deployed in a single region on different cloud providers. For example, you cannot set up Network Peering between an Atlas cluster hosted in a single region on AWS and an application hosted in a single region on GCP.

Look forward to hearing from you.

Regards,
Jason

K8s clusters are operating in aws and gcp, respectively. That’s why I’m trying to connect through vpc peering.

But if this is not possible, is there a way to satisfy the following three?

  1. Connection strings should be restricted to ip even if they are stolen.
  2. ip keeps changing (because it’s k8s)
  3. Cloud is using aws, gcp.

I wrote it down at the bottom