etcd集群搭建 3個節點

2021-09-22 02:39:15 字數 1832 閱讀 4147

參考**

os:ubuntu 16.04

搭建乙個三節點的etcd集群

etcd1:192.168.122.103

etcd2:192.168.122.208

etcd3:192.168.122.1

curl

wget

tar -zxvf etcd-v3.3.1-linux-amd64.tar.gz

cd etcd-v3.3.1-linux-amd64

cp etcd etcdctl /usr/local/bin/

mkdir -p /var/lib/etcd
vim /usr/lib/systemd/system/etcd.service #如果沒有system目錄則新建立乙個

# 檔案內容如下

其他節點進行同樣的操作

我首先在一台機器上進行了測試,即乙個節點的集群,測試成功,後來擴充套件到三颱,但一直搭建失敗,失敗截圖如下:

進入資料目錄,將其刪除,重新啟動集群,成功解決,可能是第一次使用一台機器測試時已經有資料記錄進去,導致後來三颱搭建不成功

etcd集群搭建

etcd是一種以key value形式的分布式儲存。etcd配置 name etcd1 名稱各個節點都是唯一的 client 配置 listen client urls 監聽client advertise client urls client對外提供服務 peer配置 用於節點內部通訊 liste...

etcd集群搭建

centos 192.168.3.65 node 1 centos 192.168.3.66 node 2systemctl stop firewalldyum install etcd cp etc etcd etcd.conf etc etcd etcd.conf.bak192.168.3.65...

搭建etcd集群

etcdctl 報錯收集 啟動引數說明 物理機搭建set token token host 1 192.168.0.3 mac的ip 按情況替換 this ip 按情況替換 設定值 檢視值 etcdctl.exe endpoints endpoints put foo hello world etc...