简体   繁体   中英

Mongodb Atlas Google Cloud peering fails with an ip range in the local network overlaps with an ip range in an active peer

I have a GCP Project "A" where I had previously added VPC peering with MongoDB Atlas:

在此处输入图像描述

This way my development GKE cluster (whose VPC range is 10.7.0.0/16) will support peering when accessing MongoDB. So far everything works as expected.

Now I've provisioned another GKE cluster for preproduction, with its own VPC range on 10.221.0.0/16. I've also created another database in the same Mongo cluster "app-pre" and wanted to add VPC peering for the new cluster.

I followed the same steps:

  1. Mongo Atlas: add peering connection for GCP project "A", VCP name and CIDR 192.168.0.0/16
  2. GCP Create Peering Connection

The problem is I get the following error:

An ip range in the local.network (10.221.0.0/16) overlaps with an ip range (10.221.0.0/16) in an active peer of the peer.network

在此处输入图像描述

Posting this as an answer in order to help other people.

What @john-hanley mentions is correct, basically you can't have 2 or more VPC peerings when they are using overlapping IP ranges, this is because GCP routes would be created with the same "priority" and therefore it would be confusion as to where to send a packet to those routes.

The message you are getting is basically that you are already using one range this way and intend to use this very same range "10.221.0.0/16" again.

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