Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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集群

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保持一致