[英]GCP: Trying to hit an Internal load balancer (internal IP) from Cloud Function
We have 3-4 services which we deploy via Instance Groups on GCP.我们通过 GCP 上的实例组部署了 3-4 项服务。 We use an internal HTTP load balancer to allow access to these services within the.network.
我们使用内部 HTTP 负载平衡器来允许访问 .network 中的这些服务。
Now we also have some independent Cloud Functions running in the same project.现在我们还有一些独立的 Cloud Functions 在同一个项目中运行。 We are looking to hit the internal load balancer IP from these cloud functions.
我们希望通过这些云函数访问内部负载均衡器 IP。 We are able to hit directly the IPs of VMs from cloud function by setting up a serverless VPC as described in this blog .
通过设置无服务器 VPC,我们可以直接访问来自云 function 的 VM 的 IP,如本博客中所述。 However calls to load balancer are not happening.
但是,不会调用负载均衡器。 Are we missing some other firewall rules to be configured?
我们是否缺少要配置的其他一些防火墙规则? Any suggestions are appreciated.
任何建议表示赞赏。
Solution :解决方案:
The Cloud Function, Serverless VPC and internal Load Balancer have to be in the same region. Cloud Function、Serverless VPC 和内部负载均衡器必须在同一区域。 By placing all of them in same region we were able to solve the issue.
通过将它们全部放在同一区域,我们能够解决问题。
Keep in mind, the Cloud Function, Serverless VPC, and internal Load Balancer have to be in the same region .请记住,Cloud Function、无服务器 VPC 和内部负载均衡器必须位于同一区域。 By placing all of them in the same region, you could solve the issue.
通过将它们全部放在同一区域,您可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.