kubernetes部署高可用redis

本文redis經過helm搭建,提供redis高可用完整的編排,關於Helm的搭建和使用請查看文章《helm的搭建及使用》,其中前一章介紹了Helm搭建,並提供了Helm搭建Harbor的例子,因此本意僅作簡要敘述git

可根據https://github.com/bitnami/charts/tree/master/upstreamed/redis使用helm在線安裝

下載到本地安裝,並保存debug日誌,將日誌多餘部分刪除,保留redis的編排文件以便以後使用github

git clone https://github.com/bitnami/charts.git
cd XXX/bitnami/charts/upstreamed/redis
helm install . --debug --name hub |sed 'w harbor.yaml'

做者整理可用的編排文件:
連接:https://pan.baidu.com/s/1_veDQVxQTp_tbQibynEjSQ 密碼:x9l1
redis

注意⚠️根據具體狀況修改編排文件的Volume部分debug

volumeClaimTemplates:
  - metadata:
      name: data
      annotations:
    spec:
      accessModes:
        - "ReadWriteOnce"
      resources:
        requests:
          storage: "5Gi"
      storageClassName: nfs

因爲國內對k8s集羣資料極少,本文爲做者爬坑手碼,若是對您有所幫助但願能夠留下你的喜歡