Connect to an instance
--instance takes the region and the name, as REGION/NAME.
bqto gives you a port forward. The local port is the port of the instance plus 10000, so 6379
becomes 16379. A Redis instance with TLS, on 6378, becomes 16378.
With -- CMD, use redis-cli -h $BQTO_HOST -p $BQTO_PORT.
TLS and AUTH
With-- CMD, two variables tell your client what the instance needs:
BQTO_TLSis1when your client must use TLS, and empty otherwise.BQTO_AUTHnames the credential that the instance takes:password(an AUTH string),iam(an access token), or empty for none.
server-ca.pem. On its CA: line, bqto prints
the gcloud command that writes this file. With BQTO_AUTH=password, set REDISCLI_AUTH to the
AUTH string of the instance before you start bqto.
Put the client lines in a script, such as client.sh:
Clusters
Memorystore for Redis Cluster and Memorystore for Valkey in cluster mode need bqto Pro.
proxychains4 -q redis-cli -c -h HOST -p PORT, with a proxychains.conf whose last line is
socks5 127.0.0.1 PORT. BQTO_REMOTE holds the address to reach through the proxy.
What it needs
- The API
redis.googleapis.comfor Redis, ormemorystore.googleapis.comfor Valkey, in the service project. - The role
roles/redis.viewerfor Redis, orroles/memorystore.viewerfor Valkey, in the service project, together with the roles that every session needs. See Permissions.