简体   繁体   English

GCP:尝试从 Cloud Function 中访问内部负载均衡器(内部 IP)

[英]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.

相关问题 带有 static ip 的内部负载均衡器,在 AWS EKS 中支持 HTTPS - internal load balancer with static ip and supports HTTPS in AWS EKS 是否可以将内部负载均衡器部署到一个 su.net 上? (AWS 云) - Can an internal load balancer be deployed to one subnet? (AWS Cloud) 如何找到私有区域中托管的 GCP Cloud DNS 服务器的内部 IP 地址 - How to find the Internal IP Address of GCP Cloud DNS server hosted in Private Zone GCP Google Cloud - 无法创建负载均衡器 - GCP Google Cloud - Cannot create Load Balancer GCP 负载均衡器不会将它自己的 ip 重定向到域 - GCP load balancer does not redirect it's own ip to domain Terraform gcp 获取实例的内部私有 ip 并写入文件 - Terraform gcp get internal private ip of instance and write to file 使用 GCP terraform 将域名附加到私有内部 IP - Attach Domain Name to private internal IP with GCP terraform 新 VM 不能使用未分配的 Static 内部 IP GCP - New VM can't use unassigned Static Internal IP GCP 无法使用 nginx 入口访问在内部负载均衡器上公开的服务 - Cannot access services exposed on internal load balancer with nginx ingress AWS 中的内部和外部负载均衡器有什么区别? - What is the difference between the internal and External load balancer in AWS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM