I have an instance in Google Cloud Memorystore. I want to connect to it from builds that I run in Google Cloud Build.
I created the following configuration file for Cloud Build:
steps: - name: 'gcr.io/cloud-builders/docker' args: - run - redis - redis-cli - -h - 10.1.2.3 - PUBLISH - cloud-build-1 - msg1
(I've changed the IP address, but that's an unimportant detail.)
I ran that configuration file using the following command:
gcloud builds submit --no-source --config cloudbuild.yaml
The build failed. The output of the command included:
Could not connect to Redis at 10.1.2.3:6379: Connection timed out
(Again, I have changed the IP address.)
How can I get this redis-cli
command to work?