当前位置:网站首页>Helm deploy etcd cluster
Helm deploy etcd cluster
2022-07-06 18:46:00 【Development, operation and maintenance Xuande public】
List of articles
1. chart And image preparation
1.1 The official download chart
- Download address
https://artifacthub.io/ - Search for etcd, choice bitnami Version of

1.2 download
Find a server that can access the public network , Refer to the official download chart package
- add to helm Warehouse
# helm repo add bitnami-aks https://marketplace.azurecr.io/helm/v1/repo
- Choose the right version
# helm pull bitnami-aks/etcd --version 6.2.9
so chart The package has been downloaded to the current directory
# ll
-rw-r--r-- 1 root root 34334 7 month 19 14:34 etcd-6.2.10.tgzgz
take chart Copy to the target server .
1.3 Download mirroring
1.3.1 Download mirroring
The following images should be prepared in advance for offline installation :
- etcd Mirror image ( necessary )
docker.io/bitnami/etcd:3.4.15-debian-10-r33 - License related ( It's not necessary )
The image below is for writing licenses , If the license is not enabled, you can not downloaddocker.io/bitnami/bitnami-shell:10-debian-10-r134
1.3.2 Upload private image warehouse
The private image name is as follows :harbocto.xxx.com.cn/bitnami/etcd:3.4.15-debian-10-r33harbocto.xxx.com.cn/bitnami/bitnami-shell:10-debian-10-r134
2. Modify the configuration file
Enter the generated after decompression etcd Catalog
- Modify the mirror ( Offline installation is necessary )
Change to local image
image:
registry: harbocto.xxx.com.cn
repository: bitnami/etcd
tag: 3.5.0-debian-10-r24
The lower license is not enabled , So it's OK not to modify
volumePermissions:
enabled: false
image:
registry: harbocto.xxx.com.cn
repository: bitnami/bitnami-shell
tag: 10-debian-10-r134
pullPolicy: Always
- Change Password ( It's not necessary )
auth:
rbac:
……
rootPassword: "Boe888888"
- Number of modified copies ( necessary )
replicaCount: 3
- Persistent storage size ( It's not necessary )
Persistent storage is enabled by default :persistence.enabled=true
So we just need to change pvc The size is ok
persistence:
......
size: 50Gi
- It is amended as follows NodePort( It's not necessary )
I didn't actually open , So the back service You can see what I still use ClusterIP
notes ClusterIP Add the following after :
service:
type: NodePort
#type: ClusterIP
......
nodePorts:
clientPort: "31015"
peerPort: "31016"
3 Start the service
- establish namespace, Get into chart Of etcd Directory startup service
[[email protected] etcd]# kubectl create namespace etcd
[[email protected] etcd]# helm install etcd -n etcd ./
- see pod
[[email protected] etcd]# kubectl get pod -n etcd
NAME READY STATUS RESTARTS AGE
etcd-0 1/1 Running 0 25m
etcd-1 1/1 Running 0 25m
etcd-2 1/1 Running 0 25m
- see service
[[email protected] etcd]# kubectl get service -n etcd
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
etcd ClusterIP 10.1.231.186 <none> 2379/TCP,2380/TCP 25m
etcd-headless ClusterIP None <none> 2379/TCP,2380/TCP 25m
4. test
- Output
The visible data just created is as follows :
[[email protected] etcd]# helm install etcd -n etcd ./
NAME: etcd
LAST DEPLOYED: Mon Jul 19 15:56:47 2021
NAMESPACE: etcd
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.etcd.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 harbocto.boe.com.cn/bitnami/etcd:3.5.0-debian-10-r24 --env ROOT_PASSWORD=$(kubectl get secret --namespace etcd etcd -o jsonpath="{.data.etcd-root-password}" | base64 --decode) --env ETCDCTL_ENDPOINTS="etcd.etcd.svc.cluster.local:2379" --namespace etcd --command -- sleep infinity
Then, you can set/get a key using the commands below:
kubectl exec -it etcd-client -- bash
etcdctl --user root:$ROOT_PASSWORD put /message Hello
etcdctl --user root:$ROOT_PASSWORD get /message
To connect to your etcd server from outside the cluster execute the following commands:
kubectl port-forward --namespace etcd svc/etcd 2379:2379 &
echo "etcd URL: http://127.0.0.1:2379"
* As rbac is enabled you should add the flag `--user root:$ETCD_ROOT_PASSWORD` to the etcdctl commands. Use the command below to export the password:
export ETCD_ROOT_PASSWORD=$(kubectl get secret --namespace etcd etcd -o jsonpath="{.data.etcd-root-password}" | base64 --decode)
- Get into etcd Of pod
[[email protected] etcd]# kubectl exec -it -n etcd etcd-0 bash
- Write data
I have no [email protected]:/opt/bitnami/etcd$ etcdctl --user root:Bxx888888 put /message Hello
OK
- Read the data just written
I have no [email protected]:/opt/bitnami/etcd$ etcdctl --user root:Bxx888888 get /message
/message
Hello
FAQ
1)helm3.0.3 Report errors
helm 3.0.3 An error is as follows :
[[email protected] etcd]# helm version
version.BuildInfo{
Version:"v3.0.3", GitCommit:"ac925eb7279f4a6955df663a0128044a8a6b7593", GitTreeState:"clean", GoVersion:"go1.13.6"}
[[email protected] etcd]# helm install etcd -n etcd-ha ./
Error: parse error at (etcd/charts/common/templates/_secrets.tpl:84): function "lookup" not defined
【 solve 】
I am upgrading directly to 3.5.4 It's solved

边栏推荐
- 手写一个的在线聊天系统(原理篇1)
- Splay
- 视频化全链路智能上云?一文详解什么是阿里云视频云「智能媒体生产」
- Collection of penetration test information -- use with nmap and other tools
- Epoll () whether it involves wait queue analysis
- 基于ppg和fft神经网络的光学血压估计【翻译】
- 文档编辑之markdown语法(typora)
- 被疫情占据的上半年,你还好么?| 2022年中总结
- Cobra quick start - designed for command line programs
- DOM简要
猜你喜欢

用于远程医疗的无创、无袖带血压测量【翻译】

On AAE

C#/VB.NET 给PDF文档添加文本/图像水印

Splay
![A wearable arm device for night and sleeveless blood pressure measurement [translation]](/img/fd/947a38742ab1c4009ec6aa7405a573.png)
A wearable arm device for night and sleeveless blood pressure measurement [translation]
![[Matlab] Simulink 同一模块的输入输出的变量不能同名](/img/99/adfe50075010916439cd053b8f04c7.png)
[Matlab] Simulink 同一模块的输入输出的变量不能同名

287. 寻找重复数
![Deep circulation network long-term blood pressure prediction [translation]](/img/9c/c1ed28242a4536c1e8fde3414f82a8.png)
Deep circulation network long-term blood pressure prediction [translation]

The role of applet in industrial Internet

Alibaba cloud international ECS cannot log in to the pagoda panel console
随机推荐
celery最佳实践
Online notes
[sword finger offer] 60 Points of N dice
DOM简要
随着MapReduce job实现去加重,多种输出文件夹
From 2022 to 2024, the list of cifar azrieli global scholars was announced, and 18 young scholars joined 6 research projects
Example of implementing web server with stm32+enc28j60+uip protocol stack
Cocos2d Lua 越来越小样本 内存游戏
监控界的最强王者,没有之一!
Certains marchés de l'emploi de Shanghai refusent d'embaucher des personnes qui se rétablissent positives à Xinguan
一种用于夜间和无袖测量血压手臂可穿戴设备【翻译】
Execution process of MySQL query request - underlying principle
Easy to use PDF to SVG program
二叉搜索树
青龙面板最近的库
Huawei 0 foundation - image sorting
复现Thinkphp 2.x 任意代码执行漏洞
涂鸦智能在香港双重主板上市:市值112亿港元 年营收3亿美元
Top command details
测试1234