Files
oam/knowledge base/redis-cli.md
2023-05-25 21:38:10 +02:00

1.2 KiB

redis-cli

Table of contents

  1. TL;DR
  2. Further readings
  3. Sources

TL;DR

# Install it.
asdf plugin add 'redis-cli' && asdf install 'redis-cli' '6.2.12'
brew install 'redis'
dnf install 'redis'

# Connect to servers.
redis-cli -s 'socket'
redis-cli -h 'host.fqdn' -p 'port'
redis-cli … -a 'password'
REDISCLI_AUTH='password' redis-cli
redis-cli -u 'redis://username:password@host.fqdn:port/db_number'

# Execute commands.
redis-cli 'command' 'arg_1''arg_N'
redis-cli -h 'localhost' 'PING'
redis-cli -n 'db_number' 'INCR' 'a'

# Execute commands from the master's container in kubernetes.
kubectl exec redis-0 -- redis-cli 'PING'

# Debug the server.
redis-cli … 'MONITOR'

Further readings

Sources

All the references in the further readings section, plus the following: