etcdadm

etcdadm 是一款用于操作 etcd 群集的命令行工具。通过它可以轻松创建新集群、添加成员到现有集群或从现有集群中移除成员。「etcdadm is a command-line tool for operating an etcd cluster. It makes it easy to create a new cluster, add a member to, or remove a member from an existing cluster. 」

Github星跟蹤圖

etcdadm

etcdadm is a command-line tool for operating an etcd cluster. It makes it easy to create a new cluster, add a member to, or remove a member from an existing cluster. Its user experience is inspired by kubeadm.

For major project goals, see the roadmap

Table of Contents

Getting Started

Building

  1. Clone the git repository.
  2. Build on the host:
    make etcdadm
    
  3. Build in a container, using docker:
    make container-build
    
    GOPROXY env will be inherited:
    GOPROXY=https://goproxy.io make container-build
    

Creating a new cluster

  1. Copy etcdadm to each machine that will become a member.
  2. Choose one machine and run
etcdadm init

Adding a member

  1. Copy the CA certificate and key from any machine in the cluster to the machine being added.
rsync -avR /etc/etcd/pki/ca.* <Member IP address>:/
  1. Choose a cluster endpoint (i.e. client URL of some member) and run
etcdadm join <endpoint>

Removing a member

On the machine being removed, run

etcdadm reset

Advanced Usage

Creating a new cluster from a snapshot

If you have an existing etcd snapshot, you can use it to create a new cluster:

etcdadm init --snapshot /path/to/etcd.snapshot

Caveats and Limitations

  1. Must run as root. (This is because etcdadm creates a systemd service)
  2. Does not support etcd v2.
  3. Currently tested on Container Linux, with plans for other platforms.

Design

The goal of etcdadm is to make it easy to operate an etcd cluster. It downloads a specific etcd release, installs the binary, configures a systemd service, generates certificates, calls the etcd API to add (or remove) a member, and verifies that the new member is healthy.

Etcdadm must be run on the machine that is being added or removed. As a consequence, if a member permanently fails, and the operator cannot invoke etcdadm reset on that machine, the operator must use the etcd API to delete the failed member from the list of members.

On its own, etcdadm does not automate cluster operation, but a cluster orchestrator can delegate all the above tasks to etcdadm.

Sequence Diagrams

See docs/diagrams for sequence diagrams of init, join, and reset.

Questions?

For more information reach out to etcdadm slack channel

主要指標

概覽
名稱與所有者kubernetes-retired/etcdadm
主編程語言Go
編程語言Go (語言數: 4)
平台
許可證Apache License 2.0
所有者活动
創建於2018-06-13 17:16:08
推送於2024-04-29 17:19:53
最后一次提交2024-04-29 10:19:52
發布數31
最新版本名稱etcd-manager/v3.0.20230925 (發布於 2023-09-25 15:23:43)
第一版名稱v1.10.4-alpha (發布於 2018-07-15 13:20:10)
用户参与
星數755
關注者數35
派生數131
提交數1.3k
已啟用問題?
問題數127
打開的問題數0
拉請求數231
打開的拉請求數0
關閉的拉請求數40
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?