In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Etcd is a distributed key-value storage system based on Raft, developed by CoreOS, and is often used for service discovery, shared configuration and concurrency control (such as leader election, distributed locking, etc.). Kubernetes uses etcd to store all running data.
Deployment preparation
All operations are performed on the devops machine, the relevant scripts are edited, and then executed uniformly through the ansible script module.
Define the environment variable # Variable parameter setting # # ETCD_INSTALL_PATH= "/ data/apps/k8s/etcd" ETCD_BIN_DIR= "${ETCD_INSTALL_PATH} / bin" ETCD_DATA_DIR= "${ETCD_INSTALL_PATH} / data" ETCD_WAL_DIR= "${ETCD_INSTALL_PATH} / wal" N01 = "master" -k8smurn01 = https://10.10.10.22:2380"N02="master-k8s-n02=https://10.10.10.23:2380"N03="master-k8s-n03=https://10.10.10.24:2380"ETCD_ENPOIDTS="$N01, N02 CA_PATH= / etc/k8s/ssl "SOFTWARE=" / root/software "VERSION=v3.3.13PACKAGE=" etcd-$ {VERSION}-linux-amd64.tar.gz "HOSTNAME= `hostname`DOWNLOAD _ URL=" https://github.com/devops-apps/download/raw/master/etcd/${PACKAG}"ETH_INTERFACE=eth2LISTEN_IP=$(ifconfig | grep-A1 ${ETH_INTERFACE} | grep inet | awk'{print $2}') USER=k8s downloads and distributes etcd binaries
Log in to devops to visit the release page of etcd to download the latest version of the release package and synchronize it to the three master three nodes / root/software directory through ansible:
Wget $DOWNLOAD_URL-P $SOFTWARE2 deploy etcd cluster
On the devops host, use ansible to do the following for each of the three master nodes:
2.1 install etcd binary execution command # 1.Check if the install directory exists.if [!-d $ETCD_BIN_DIR]; then mkdir-p $ETCD_BIN_DIR mkdir-p $ETCD_DATA_DIR mkdir-p $ETCD_WAL_DIRfi### 2.Install etcd binary of kubernetes.if [!-f "$SOFTWARE/etcd-$ {VERSION}-linux-amd64.tar.gz"] Then sudo wget $DOWNLOAD_URL-P $SOFTWARE > > / tmp/install.log 2 > & 1ficd $SOFTWARE & & tar-xzf etcd-$ {VERSION}-linux-amd64.tar.gz-C. / cp-fp etcd-$ {VERSION}-linux-amd64/etcd* $ETCD_BIN_DIRln-sf $ETCD_BIN_DIR/ {etcd Etcdctl} / usr/local/binsudo chmod-R 755 $ETCD_INSTALL_PATHsudo chown-R $USER:$USER $ETCD_INSTALL_PATH2.2 create etcd's systemd unit startup service file cat > / usr/lib/systemd/system/etcd.service
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.