我可以在 GCP 中创建一个 VPN 来提供对多个项目的访问吗?
Can I create a single VPN in GCP that provides access to multiple projects?
我是否可以创建一个可以访问所有项目的“超级”VPN,而不是为我们组织中的每个 GCP 项目创建一个 VPN?我正在查看共享 VPC,但我无法从文档中弄清楚共享 VPC 是否可以解决问题。我不是最擅长社交的,也许我忽略了一些东西。欢迎提出建议。
你有 2 个解决方案来解决这个问题
- 使用 VPN 创建一个项目,然后创建与其他项目的对等互连。这个问题是你被限制在 25 peering per VPC。此外,VPC peering 还有一个限制:transitivity 是被禁止的。如果您在 A 和 B 之间以及 B 和 C 之间有对等互连,则 A 无法到达 C,传递性是不允许的,这可能会在您的设计后期造成一些 issues/limitation。
- 使用共享 VPC。您有一个带有 VPC 和 VPN 的宿主项目,然后是使用自己的 VPC(用于独立应用程序)或共享 VPC 的服务项目。您有详细信息 here. However in this solution, all the service project have access to the same VPC, and thus all the VM of the services projects can access to the VPC ressources (others VM, VPN, ...). The firewall rules will be very important; and a good way to solve this is to use firewall rules based on service account.
我是否可以创建一个可以访问所有项目的“超级”VPN,而不是为我们组织中的每个 GCP 项目创建一个 VPN?我正在查看共享 VPC,但我无法从文档中弄清楚共享 VPC 是否可以解决问题。我不是最擅长社交的,也许我忽略了一些东西。欢迎提出建议。
你有 2 个解决方案来解决这个问题
- 使用 VPN 创建一个项目,然后创建与其他项目的对等互连。这个问题是你被限制在 25 peering per VPC。此外,VPC peering 还有一个限制:transitivity 是被禁止的。如果您在 A 和 B 之间以及 B 和 C 之间有对等互连,则 A 无法到达 C,传递性是不允许的,这可能会在您的设计后期造成一些 issues/limitation。
- 使用共享 VPC。您有一个带有 VPC 和 VPN 的宿主项目,然后是使用自己的 VPC(用于独立应用程序)或共享 VPC 的服务项目。您有详细信息 here. However in this solution, all the service project have access to the same VPC, and thus all the VM of the services projects can access to the VPC ressources (others VM, VPN, ...). The firewall rules will be very important; and a good way to solve this is to use firewall rules based on service account.