DEV Community

Cover image for pebl cli release - redis tunnel support!
Jin Lee for pebl

Posted on • Edited on • Originally published at blog.pebl.io

pebl cli release - redis tunnel support!

Quick Summary

The latest pebl cli now supports creating tunnels to your redis instances!
Make sure to download the latest cli in order to easily gain access to
your remote redis instances.

Longform

If you don't have redis running on pebl's cloud runtime yet, head
over to the intro to redis guide
to create one!

setup

Follow the setup guide to install
the latest pebl cli. Make sure that the cli is properly installed
by checking the output of pebl version:

$ pebl version
0.0.2
Enter fullscreen mode Exit fullscreen mode

pebl tunnel

To create the tunnel, simply run the pebl tunnel command and supply
the name of the redis instance you want to connect to:

$ pebl tunnel my-redis-1
Enter fullscreen mode Exit fullscreen mode

However, if you have just one redis in our cloud runtime, you can omit
the name argument:

$ pebl tunnel
Enter fullscreen mode Exit fullscreen mode

This will automatically create a tunnel to your one redis instance.

redis-cli

The command allocates a local port that will proxy traffic between
your local machine to the cloud redis instance. The command will
output the local port and an example redis-cli command that you
can invoke:

$ pebl tunnel
tunnel established at: 127.0.0.1:12345
use redis-cli to connect:
redis-cli -p 12345
Enter fullscreen mode Exit fullscreen mode

Then simply invoke the redis-cli with the -p option to connect.

$ redis-cli -p 12345
127.0.0.1:12345> ping
PONG
Enter fullscreen mode Exit fullscreen mode

And that's it! That should give a fast way to inspecting your
redis instances. For more information on how to utilize redis
on the pebl runtime, head over to the
intro to redis guide.

Top comments (0)