当前位置:网站首页>Redis cluster 6.2.6
Redis cluster 6.2.6
2022-04-22 20:01:00 【Wild boar Pei squeeze】
tee redis-all.yaml<<-'EOF'
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: test01
labels:
app: redis
spec:
ports:
- port: 6379
targetPort: 6379
name: redis-port
clusterIP: None
selector:
app: redis
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis
namespace: test01
spec:
selector:
matchLabels:
app: redis
serviceName: "redis-service"
replicas: 6
template:
metadata:
labels:
app: redis
spec:
terminationGracePeriodSeconds: 20
containers:
- name: redis
image: redis:6.2.6-alpine
command:
- "redis-server"
args:
- "/etc/redis/redis.conf" #redis-server The following parameters , Line breaks represent spaces
- "--protected-mode" # Allow Internet access
- "no"
# command: redis-server /etc/redis/redis.conf --protected-mode no
resources:
requests:
cpu: "100m"
memory: "100Mi"
ports:
- name: redis
containerPort: 6379
protocol: "TCP"
volumeMounts:
- name: "redis-conf"
mountPath: "/etc/redis"
- name: "redis-data"
mountPath: "/var/lib/redis"
volumes:
- name: "redis-conf"
configMap:
name: "redis-conf"
items:
- key: "redis.conf"
path: "redis.conf"
volumeClaimTemplates:
- metadata:
name: "redis-data"
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: openebs-hostpath
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-conf
namespace: test01
data:
redis.conf: | appendonly yes cluster-enabled yes cluster-config-file /var/lib/redis/nodes.conf cluster-node-timeout 5000 dir /var/lib/redis port 6379
EOF
Create clusters manually
kubectl -n test01 exec -it redis-0 -- redis-cli --cluster create --cluster-replicas 1 $(kubectl -n test01 get pods -l app=redis -o jsonpath='{range.items[*]}{.status.podIP}:6379 ' | awk 'NF--')
Automatically create clusters
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install staging bitnami/redis-cluster \
--set usePassword=false \
--set replica.replicaCount=6 \
--set persistence.size=1Gi \
--set metrics.enabled=true \
--set persistence.storageClass=openebs-hostpath
# Turn on metrics Will turn on the side car
Official website
https://github.com/bitnami/charts/tree/master/bitnami/redis-cluster
版权声明
本文为[Wild boar Pei squeeze]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221959470436.html
边栏推荐
- 短信验证两种定时禁用处理机制及区别
- 图像预训练模型的起源解说和使用示例
- [H5] wechat H5 page production
- [basic knowledge of automated testing] basic concepts and common frameworks of automated testing
- 金仓数据库KingbaseES服务启动方法
- Why puddingswap may be a strong dark horse in the field of gamefi?
- Open source, free and best used 3 systems and 9 firewall software Amway gives you
- 开源免费,最好用的3大系统9大防火墙软件安利给你们
- 为什么说PuddingSwap或许为成为GameFi领域的一匹强势黑马?
- Pytorch deep learning practice 09 multi classification questions
猜你喜欢

Quarkus dependency injection 9: bean read / write lock

模块四作业

Industry trends are far more important than efforts -- top test technology summary

Selenium automatic pop-up processing

Embedded Web project (I) -- introduction of web server

What is the reason why the camera device with built-in 4G card of Haikang cannot register with easycvr platform?

396. 旋转函数(数学规律 + 迭代法)

Connection method of Jincang database kingbasees

哪个品牌的运动耳机比较好、好用的运动耳机推荐

Why do I suggest you work in a technical position instead of a clerical position, sales
随机推荐
新一代代理利器 - traefik
Application of C language bit field -- storing eight flag bits in one byte
What is the reason why the camera device with built-in 4G card of Haikang cannot register with easycvr platform?
Which futures company is safer to open a domestic futures account?
【H5】微信端H5页面制作
Internet News: Lenovo announced the new progress of ESG; Excellent sound and painting of Jimi h3s and z6x Pro were highly praised; Little red book responded to "layoffs of 20%"
【Leetcode-每日一题】旋转函数
家用智能投影仪首选,走进极米H3S投影
【Unity/C#】游戏出现区域性崩溃,深藏的国际化巨坑
嵌入式Web项目(一)——Web服务器的引入
sys_ctl启动kingbase单机服务时报错:could not bind IPv4 address “0.0.0.0“: Address already in use
光刻机巨头ASML爆料:芯片太缺,都开始拆洗衣机了!
C process runs the asynchronous echo of CMD command
工作光靠努力是不够的!还有这个...
Household intelligent projector is the first choice, entering the polar meter h3s projection
【Unity】可玩广告Luna Playable插件的踩坑记录
怎么才能申购可转债呢?申购可转债安全吗?
How can I apply for new shares? Is it safe to apply for new shares?
[eight part essay] thread safety
How to break the midlife crisis? Internet people look at it