简体   繁体   English

Mongodb Atlas Google Cloud 对等连接失败,local.network 中的 ip 范围与活动对等体中的 ip 范围重叠

[英]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:我遵循了相同的步骤:

  1. Mongo Atlas: add peering connection for GCP project "A", VCP name and CIDR 192.168.0.0/16 Mongo Atlas:为 GCP 项目“A”、VCP 名称和 CIDR 192.168.0.0/16 添加对等连接
  2. GCP Create Peering Connection GCP 创建对等连接

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.

相关问题 将 Google Cloud 存储桶的访问权限限制在某个 IP 范围内 - Restrict access to a Google Cloud bucket to a certain IP range 使用 VPC 和 peer.networking 时如何从 Google Cloud Run 连接到 MongoDB Atlas? - How do you connect to MongoDB Atlas from Google Cloud Run when using VPC and peer networking? 如何通过私有 IP 将本地服务器连接到 Google Cloud SQL,其中私有 IP 与本地 su.net 冲突? - How to connect on-prem server to Google Cloud SQL over private IP, where private IP conflicts with local subnet? VPC 对等 - DNS 解析为公共 IP - VPC Peering - DNS resolves to public IP 谷歌云 HTTP 没有外部负载均衡器健康检查失败 IP - Google Cloud HTTP Load Balancer Health Check Fails Without An External IP AWS EFS 的网络接口无法与 static IP 关联 - Network interface of AWS EFS fails to be associated with a static IP 如果两侧 VPC CIDR 范围相同,VPC 对等? - VPC Peering if both side VPC CIDR range is same? 如何通过 CLI 获取 Google Cloud SQL 实例的 IP - How to get IP of Google Cloud SQL instance via CLI 如何使用动态 IP 在谷歌云平台创建记录集? - How to create a record set in google cloud platform with dynamic IP? 我位于亚洲的 Google Cloud 功能的美国 IP 地址 - US IP address to my Google Cloud functions located in Asia
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM