生产环境中,我们把 etcd 作分布式锁来使用,kubernetes 中部署起来很简单~

部署方法

1
2
3
4
5
# 添加 repo
helm repo add incubator https://charts.helm.sh/incubator
# 安装指定的版本
helm install etcd-cluster incubator/etcd --version=0.7.7 --set "persistentVolume.enabled=true,persistentVolume.storage=3Gi"
helm ls

需注意细节

PS:2020/11/13 之后不再使用 http://storage.googleapis.com/kubernetes-charts-incubator,若之前已添加过 incubator, 则需要使用如下命令强制更新

1
helm repo add incubator https://charts.helm.sh/incubator --force-update