google-cloud-platform - 从Cloud Run连接到Memorystore

标签 google-cloud-platform google-cloud-run

我想在Google Cloud Run上运行使用Cloud Memorystore作为缓存的服务。

我在与Cloud Run相同的区域中创建了一个Memorystore实例,并使用示例代码进行了连接:https://github.com/GoogleCloudPlatform/golang-samples/blob/master/memorystore/redis/main.go这不起作用。

接下来,我创建了无服务器的VPC访问Connectore,但没有帮助。我在没有GKE群集的情况下使用Cloud Run,所以无法更改任何配置。

有没有办法从Cloud Run连接到Memorystore?

最佳答案

要将Cloud Run(完全托管)连接到Memorystore,您需要使用称为“无服务器VPC访问”或“ VPC连接器”的机制。

截至2020年5月,Cloud Run(完全托管)对无服务器VPC访问具有Beta支持。有关更多信息,请参见Connecting to a VPC Network

使用此Beta的替代方法包括:


使用Cloud Run for Anthos,如果为集群配置了集群,则使用GKE provides the capability连接到Memorystore。
留在完全托管的Serverless中,但通过使用App Engine with Memorystore使用GA版本的Serverless VPC Access功能。

关于google-cloud-platform - 从Cloud Run连接到Memorystore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56225375/

相关文章:

google-cloud-platform - 服务帐户无法将 Docker 镜像推送到 Google Artifact 注册表

google-cloud-run - 云运行中的路由 : equivalent of dispatch. yaml/云运行的替换服务

ubuntu - 如何向 Google Cloud Compute Engine VM Linux 实例添加 SSH key ?

docker - Cloud Run 上的容器内存管理和 OOM

python-requests - Google Cloud Run 上对外部 API 的调用被阻止

google-cloud-platform - 在 Google Compute Engine 上打开端口 8080

java - Google Cloud Run for Anthos on GKE 的服务如何连接到不同组织的不同项目上的 Firestore?

谷歌云 BigQuery undefined ValueList

python-3.x - 如何将多个单元格添加到bigtable表中的一行?

python - 本地正常,但在应用程序引擎上 : ModuleNotFoundError: No module named 'google'