k8s安装redis-sentinel
使用heml安装修改可修改的master名:masterSet: mymaster副本:replicaCount: 3开启sentinel:enabled: true设密码redis:password:安装helm install -ndev redis-sentinel bitnami/redis --values values.yaml查看看主从关系kubectl logs redis-sen
·
使用heml安装
values.yaml文件下载
https://raw.githubusercontent.com/chenjiangtao/spring-boot-on-kubernetes/master/kubernetes/redis-sentinel/values.yaml
修改values.yaml文件
可修改的master名:
masterSet: mymaster
副本:
replicaCount: 3
开启
sentinel:
enabled: true
设密码
redis:
password:
安装
helm install -ndev redis-sentinel bitnami/redis --values values.yaml
查看
看主从关系
kubectl logs redis-sentinel-node-0 sentinel -ndev
看redis主机信息 port is 6379
kubectl exec -i -t redis-sentinel-node-0 -ndev -c redis -- redis-cli -h 10.100.176.247 -p 6379 -a Redis@123 info replication
查看redis sentinel ,port is 26379
kubectl exec -i -t redis-sentinel-node-0 -ndev -c redis -- redis-cli -h 10.100.176.247 -p 26379 -a Redis@123 info
#see the sentinel master info(master name etc. )
kubectl exec -i -t redis-sentinel-node-0 -ndev -c redis -- redis-cli -h 10.100.176.247 -p 26379 -a Redis@123 sentinel masters
spring boot配置 redis sentinel 参考:
参考:
Deploy a Redis Sentinel Kubernetes cluster using Bitnami Helm charts
更多推荐
已为社区贡献16条内容
所有评论(0)