Redis-Docker-Cluster模式部署
参考文献
redis.conf
配置文件
1 | # 连接端口 |
目录结构
1 | # 创建目录结构 |
1 | redis-cluster/ |
docker-compose
文件
1 | version: "3" |
- 编写完成
docker-compose.yaml
文件后,使用docker-compose -f redis-cluster.yaml up -d
启动容器
创建集群
- 进入任意容器,此处进入
redis-6371
容器
1 | # docker exec -it redis-6371 bash |
- 看到上面的输出即为 Cluster 集群配置完成.且为 3 主 3 从.
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 HoleLin's Blog!