- Server : 6 Nodes
- 3 Masters
- 3 Slaves
- OS : Ubuntu 18.04 LTS
- Clone this Source Code
$ git clone https://github.com/jittagornp/redis-cluster-example.git
$ cd redis-cluster-example
$ chmod +x *.sh
- Install Docker
$ ./install-docker.sh
- Install Redis
*** Don't forget change redis password in this file before execute
$ ./docker-run-redis.sh
- Change Node IP Address in file
vi redis-cluster-example/docker-run-redis-cluster.sh
- Create Cluster
$ ./docker-run-redis-cluster.sh
- Remote to container
$ docker exec -it redis bash
- Use Redis CLI
$ redis-cli -c -h <NODE_IP> -p 6379 -a <YOUR_REDIS_PASSWORD>
> cluster nodes