Search code examples
google-cloud-platformgoogle-cloud-memorystore

Accessing GCP Memorystore from Google Cloud Platform Cloud Shell


I recently created a redis instance in Google Cloud Platform Memorystore and was trying to connect to it using Cloud Shell.

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

But always I'm getting a connection timeout issue. As per the documentation it states the compute instances which are in the same project should be able to connect to the instance. Did anyone also encounter the same issue ? and are there any resolutions for testing it locally ?


Solution

  • Cloud Shell is very limited. The port that you are trying to connect to is not allowed for 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 that you mentioned.