首页 > 解决方案 > 从 Google Cloud Platform Cloud Shell 访问 GCP Memorystore

问题描述

我最近在 Google Cloud Platform Memorystore 中创建了一个 redis 实例,并尝试使用 Cloud Shell 连接到它。

telnet 10.0.0.3 6379
Trying 10.0.0.3...
telnet: Unable to connect to remote host: Connection timed out

但我总是遇到连接超时问题。根据文档,它指出同一项目中的计算实例应该能够连接到该实例。有没有人也遇到过同样的问题?是否有任何在本地测试的解决方案?

标签: google-cloud-platformgoogle-cloud-memorystore

解决方案


Cloud Shell 非常有限。不允许您尝试连接的端口outgoing connections。您共享的文档是指 GCE(Google Compute Engine)VM 实例,是的 Cloud Shell 提供了一个临时实例,但它非常有限。目前您只能从 Compute Engine VM 实例、Kubernetes Engine 集群和 App Engine(灵活和标准)以及 Cloud-Functions 访问它,您需要创建一个 GCE VM并按照您提到的文档进行操作。


推荐阅读