从 Google Cloud Platform Cloud Shell 访问 GCP Memorystore

Accessing GCP Memorystore from Google Cloud Platform Cloud Shell

我最近在 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

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

云 Shell 非常有限。您尝试连接的端口不允许用于您提到的 outgoing connections. The documentation you shared is referring to a GCE (Google Compute Engine) VM instance, yes Cloud Shell provides a temporary instance but it is very limited. At the moment you can only access it from Compute Engine VM instances, Kubernetes Engine clusters, and App Engine (flexible & standard) as well as Cloud-Functions, you will need to create a GCE VM and follow the documentation