helm 部署etcd

helm install -n service   bitnami/etcd --set  replicaCount=3 --set persistence.enabled=true --set metrics.enabled=true --set resources.limits.cpu=2  --set resources.limits.memory=4Gi  --set resources.requests.cpu=2  --set resources.requests.memory=4Gi     --set global.storageClass=disk --set auth.rbac.enabled=false

参考文档地址:https://github.com/bitnami/charts/tree/master/bitnami/etcd/#installing-the-chart

# helm  status -n service weirproxy


NAME: etcd LAST DEPLOYED: Thu Sep
23 17:27:57 2021 NAMESPACE: service STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: ** Please be patient while the chart is being deployed ** etcd can be accessed via port 2379 on the following DNS name from within your cluster: etcd.service.svc.cluster.local To create a pod that you can use as a etcd client run the following command: kubectl run etcd-client --restart='Never' --image docker.io/bitnami/etcd:3.5.0-debian-10-r64 --env ETCDCTL_ENDPOINTS="etcd.service.svc.cluster.local:2379" --namespace service --command -- sleep infinity Then, you can set/get a key using the commands below: kubectl exec --namespace service -it etcd-client -- bash etcdctl put /message Hello etcdctl get /message To connect to your etcd server from outside the cluster execute the following commands: kubectl port-forward --namespace service svc/etcd 2379:2379 & echo "etcd URL: http://127.0.0.1:2379"

 

posted @ 2021-09-23 17:43  萱乐庆foreverlove  阅读(674)  评论(0编辑  收藏  举报