
helm安装redis 哨兵集群
redis-ha-4.4.6.tgz 现在这种模式无法外部访问,redis可以访问哨兵不能访问,但是哨兵模式可以集群内部访问,配置方式如下 spring: redis: database: 1 password: gilight123!@# timeout: 3000 sentinel: master: mymaster password: gilight123!@# #哨兵的密码 nodes:
- redis-node-0.redis-headless.basic-components.svc.cluster.local:26379
- redis-node-1.redis-headless.basic-components.svc.cluster.local:26379
- redis-node-2.redis-headless.basic-components.svc.cluster.local:26379 [root@kubernetes01 home]# helm search repo redis NAME CHART VERSION APP VERSION DESCRIPTION bitnami/redis 17.8.0 7.0.8 Redis(R) is an open source, advanced key-value … bitnami/redis-cluster 8.3.7 7.0.8 Redis(R) is an open source, scalable, distribut…
stable/prometheus-redis-exporter 3.5.1 1.3.4 DEPRECATED Prometheus exporter for Redis metrics stable/redis 10.5.7 5.0.7 DEPRECATED Open source, advanced key-value stor… stable/redis-ha 4.4.6 5.0.6 DEPRECATED - Highly available Kubernetes implem… stable/sensu 0.2.5 0.28 DEPRECATED Sensu monitoring framework backed by… [root@kubernetes01 home]# helm fetch stable/redis-ha [root@kubernetes01 home]# ls redis-ha-4.4.6.tgz [root@kubernetes01 home]# tar -xvf redis-ha-4.4.6.tgz redis-ha/Chart.yaml redis-ha/values.yaml redis-ha/templates/NOTES.txt redis-ha/templates/_configs.tpl redis-ha/templates/_helpers.tpl redis-ha/templates/redis-auth-secret.yaml redis-ha/templates/redis-ha-announce-service.yaml redis-ha/templates/redis-ha-configmap.yaml redis-ha/templates/redis-ha-exporter-script-configmap.yaml redis-ha/templates/redis-ha-pdb.yaml redis-ha/templates/redis-ha-role.yaml redis-ha/templates/redis-ha-rolebinding.yaml redis-ha/templates/redis-ha-service.yaml redis-ha/templates/redis-ha-serviceaccount.yaml redis-ha/templates/redis-ha-servicemonitor.yaml redis-ha/templates/redis-ha-statefulset.yaml redis-ha/templates/redis-haproxy-deployment.yaml redis-ha/templates/redis-haproxy-service.yaml redis-ha/templates/redis-haproxy-serviceaccount.yaml redis-ha/templates/redis-haproxy-servicemonitor.yaml redis-ha/templates/tests/test-redis-ha-configmap.yaml redis-ha/templates/tests/test-redis-ha-pod.yaml redis-ha/README.md redis-ha/ci/haproxy-enabled-values.yaml [root@kubernetes01 home]# ls redis-ha redis-ha-4.4.6.tgz [root@kubernetes01 redis-ha]# ls Chart.yaml ci README.md templates values.yaml [root@kubernetes01 redis-ha]# vim values.yaml haproxy:
service: type: ClusterIP hardAntiAffinity: true
Configures redis with AUTH (requirepass & masterauth conf params)
auth: true #注意此处要把缩进去掉 redisPassword: gilight123!@# persistentVolume: enabled: true storageClass: “152-nfs-5g” accessModes:
- ReadWriteOnce size: 5Gi annotations: {} helm install redis-ha -f my_values.yaml –namespace=basic-components stable/redis-ha 石油部署的是新版的 redis-17.8.0.tgz
