[英]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:我有一个 GCP 项目“A”,我之前在其中添加了与 MongoDB Atlas 对等的 VPC:
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.这样,我的开发 GKE 集群(其 VPC 范围为 10.7.0.0/16)将在访问 MongoDB 时支持对等。到目前为止,一切都按预期进行。
Now I've provisioned another GKE cluster for preproduction, with its own VPC range on 10.221.0.0/16.现在,我已经为预生产配置了另一个 GKE 集群,它在 10.221.0.0/16 上有自己的 VPC 范围。 I've also created another database in the same Mongo cluster "app-pre" and wanted to add VPC peering for the new cluster.我还在同一个 Mongo 集群“app-pre”中创建了另一个数据库,并想为新集群添加 VPC 对等连接。
I followed the same steps:我遵循了相同的步骤:
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 local.network (10.221.0.0/16) 中的 ip 范围与 peer.network 的活动对等体中的 ip 范围 (10.221.0.0/16) 重叠
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. @john-hanley 提到的是正确的,基本上当它们使用重叠的 IP 范围时你不能有 2 个或更多 VPC 对等互连,这是因为 GCP 路由将以相同的“优先级”创建,因此会混淆将数据包发送到这些路由的位置。
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.您得到的消息基本上是您已经以这种方式使用了一个范围,并打算再次使用这个非常相同的范围“10.221.0.0/16”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.