Gateway connection to Redis in Kubernetes

One question:

  1. Connect directly to your master node and trying to set a random key value pair, if you get an error then there’s something wrong with your Redis set up. You can connect by either using the Docker exec command or by redis-cli -h localhost -p 6380 . This is why we exposed 6380 earlier in the docker compose file. Once you’re connected you can run the following commands:
  2. keys * - this will list all the keys, if set up properly you should see some Tyk keys.
  3. set a 1 - if there’s something wrong with your Redis nodes, then you’ll see an error similar to this: (error) MOVED 15495 192.178.300.10:6379

Should’t it be like this (note -c):

redis-cli -h localhost -p 6380 -c

as redis is in cluster mode.
I am saying that because I received same kind of error (error) MOVED 15495 192.178.300.10:6379, trying to access without -c (cluster), but redis worked fine with that option as shown on my last post.

Thank you again

1 Like