In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the detailed steps of deploying ETCD3.4.7 cluster under centos7.6". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the detailed steps of deploying ETCD3.4.7 cluster under centos7.6".
Installation package address:
Https://github.com/etcd-io/etcd/releases
Extract the configuration file of the installation file tar-xvf etcd-v3.4.7-linux-amd64.tar.gzcd etcd-v3.4.7-linux-amd64cp etcd etcdctl / k8s/etcd/bin/ setting etcd
Cat / k8s/etcd/cfg/etcd # [Member] ETCD_NAME= "etcd01" ETCD_DATA_DIR= "/ var/lib/etcd/default.etcd" ETCD_LISTEN_PEER_URLS= "https://192.168.2.88:2380" ETCD_LISTEN_CLIENT_URLS=" https://192.168.2.88:2379" # [Clustering] ETCD_INITIAL_ADVERTISE_PEER_URLS= "https://192.168.2.88:2380" ETCD_ADVERTISE_CLIENT_URLS=" https:/ / 192.168.2.88 2379 "ETCD_INITIAL_CLUSTER=" etcd01= https://192.168.2.88:2380, Etcd02= https://192.168.2.81:2380,etcd03=https://192.168.2.82:2380" ETCD_INITIAL_CLUSTER_TOKEN= "etcd-cluster"
Create a systemd unit file for etcd
Cat / usr/lib/systemd/system/etcd.service
[Unit] Description=Etcd ServerAfter=network.targetAfter=network-online.targetWants=network-online.target [Service] Type=notifyEnvironmentFile=/k8s/etcd/cfg/etcdExecStart=/k8s/etcd/bin/etcd\-initial-cluster-state=new\-- cert-file=/k8s/etcd/ssl/server.pem\-- key-file=/k8s/etcd/ssl/server-key.pem\-- peer-cert-file=/k8s/etcd/ssl/server.pem\-- peer-key-file=/k8s/etcd/ssl/server-key.pem\-- trusted- Ca-file=/k8s/etcd/ssl/ca.pem\-- peer-trusted-ca-file=/k8s/etcd/ssl/ca.pemRestart=on-failureLimitNOFILE=65536 [Install] WantedBy=multi-user.target starts ETCD service systemctl daemon-reloadsystemctl enable etcdsystemctl start etcd to view etcd status systemctl status etcd ● etcd.service-Etcd Server Loaded: loaded (/ usr/lib/systemd/system/etcd.service) Enabled; vendor preset: disabled) Active: active (running) since Tue 2019-07-09 15:55:58 CST; 1h 12min ago Main PID: 29830 (etcd) Tasks: 12 Memory: 66.7m CGroup: / system.slice/etcd.service └─ 29830 / k8s/etcd/bin/etcd-name=etcd01-data-dir=/var/lib/etcd/default.etcd-listen-peer-urls= https://192.168.1.10... Jul 09 17:07:39 qas-k8s-master01 etcd [29830]: the clock difference against peer 2369b1ebd5f356e7 is too high [1.340843978s.. sage ") Jul 09 17:07:39 qas-k8s-master01 etcd [29830]: the clock difference against peer 2369b1ebd5f356e7 is too high [1.343013157s.. shot") Jul 09 17:08:04 qas-k8s-master01 etcd [29830]: the clock difference against peer 67ad1178efd89256 is too high [1.287315582s.. shot ") Jul 09 17:08:04 qas-k8s-master01 Etcd [29830]: the clock difference against peer 67ad1178efd89256 is too high [1.285244104s.... sage ") Jul 09 17:08:09 qas-k8s-master01 etcd [29830]: the clock difference against peer 2369b1ebd5f356e7 is too high [1.340602239s.. sage") Jul 09 17:08:09 qas-k8s-master01 etcd [29830]: the clock difference against peer 2369b1ebd5f356e7 is too high [1.342891162s.. shot ") Jul 09 17:08:34 qas-k8s-master01 etcd [29830]: the clock difference against peer 67ad1178efd89256 is Too high [1.285259365s.... sage ") Jul 09 17:08:34 qas-k8s-master01 etcd [29830]: the clock difference against peer 67ad1178efd89256 is too high [1.287337806s .SHOT") Jul 09 17:08:39 qas-k8s-master01 etcd [29830]: the clock difference against peer 2369b1ebd5f356e7 is too high [1.342999378s.. SHOT ") Jul 09 17:08:39 qas-k8s-master01 etcd [29830]: the clock difference against peer 2369b1ebd5f356e7 is too high [1.339802949s.. sage") Hint: Some lines were ellipsized Use-l to show in full. Copy the startup file and configuration file to node 1, node 2cd / k8s/scp-r etcd 192.168.2.81:/k8s/scp-r etcd 192.168.2.82:/k8s/scp / usr/lib/systemd/system/etcd.service 192.168.2.81:/usr/lib/systemd/system/etcd.servicescp / usr/lib/systemd/system/etcd.service 192.168.2.82:/usr/lib/systemd/system/etcd.servicenode01 node modification
Cat / k8s/etcd/cfg/etcd
# [Member] ETCD_NAME= "etcd02" ETCD_DATA_DIR= "/ var/lib/etcd/default.etcd" ETCD_LISTEN_PEER_URLS= "https://192.168.2.81:2380"ETCD_LISTEN_CLIENT_URLS="https://192.168.2.81:2379" # [Clustering] ETCD_INITIAL_ADVERTISE_PEER_URLS=" https://192.168.2.81:2380"ETCD_ADVERTISE_CLIENT_URLS="https://192.168.2.81: 2379 "ETCD_INITIAL_CLUSTER=" etcd01= https://192.168.2.88:2380, Etcd02= https://192.168.2.81:2380,etcd03=https://192.168.2.82:2380"ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"node02 node modification
Cat / k8s/etcd/cfg/etcd
# [Member] ETCD_NAME= "etcd03" ETCD_DATA_DIR= "/ var/lib/etcd/default.etcd" ETCD_LISTEN_PEER_URLS= "https://192.168.2.82:2380"ETCD_LISTEN_CLIENT_URLS="https://192.168.2.82:2379" # [Clustering] ETCD_INITIAL_ADVERTISE_PEER_URLS=" https://192.168.2.82:2380"ETCD_ADVERTISE_CLIENT_URLS="https://192.168.2.82: 2379 "ETCD_INITIAL_CLUSTER=" etcd01= https://192.168.2.88:2380, Etcd02= https://192.168.2.81:2380,etcd03=https://192.168.2.82:2380"ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster" verifies that the cluster is running properly. / etcdctl-- cacert=/k8s/etcd/ssl/ca.pem-- cert=/k8s/etcd/ssl/server.pem-- key=/k8s/etcd/ssl/server-key.pem-- endpoints= "https://192.168.2.88:2379,https://192.168.2.81:2379, Https://192.168.2.82:2379" endpoint health
Note: start an ETCD cluster and start two nodes at the same time. It is impossible to start a node cluster properly. Return the following to indicate ok
Https://192.168.2.82:2379 is healthy: successfully committed proposal: took = 15.675731ms https://192.168.2.88:2379 is healthy: successfully committed proposal: took = 15.764248ms https://192.168.2.81:2379 is healthy: successfully committed proposal: took = 14.121678ms Thank you for reading. This is the content of "detailed steps for deploying ETCD3.4.7 Cluster under centos7.6". After studying this article I believe you have a deeper understanding of the detailed steps of deploying ETCD3.4.7 clusters under centos7.6, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.