Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pigloverabbit520/redis-cluster-k8s
在k8s中的redis集群
https://github.com/pigloverabbit520/redis-cluster-k8s
k8s redis-cluster
Last synced: about 2 months ago
JSON representation
在k8s中的redis集群
- Host: GitHub
- URL: https://github.com/pigloverabbit520/redis-cluster-k8s
- Owner: pigLoveRabbit520
- Created: 2019-03-07T05:09:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-23T03:55:21.000Z (over 5 years ago)
- Last Synced: 2023-07-17T11:35:58.646Z (over 1 year ago)
- Topics: k8s, redis-cluster
- Size: 8.79 KB
- Stars: 7
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 使用
* 生成StatefulSet:`kubectl create -f redis-sts.yaml`
* 生成Service:`kubectl create -f redis-svc.yaml`
* 启动redis集群:`kubectl exec -it redis-cluster-0 -- redis-cli --cluster create --cluster-replicas 1 $(kubectl get pods -l app=redis-cluster -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')`# 说明
* 需要使用`StorageClass`动态创建pv
* `StatefulSet`中的serviceName要和Service的metadata中name保持一致