Skip to content

dlipovetsky/etcdadm

This branch is 1103 commits behind kubernetes-retired/etcdadm:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

df2644e · Oct 28, 2019
Jul 28, 2019
Sep 26, 2019
Jul 2, 2019
Sep 2, 2019
Jul 28, 2019
Jul 26, 2019
Jul 2, 2019
Sep 20, 2019
Aug 29, 2019
Jul 2, 2019
Jul 2, 2019
Jul 2, 2019
Aug 29, 2019
Oct 28, 2019
Jul 2, 2019
Jun 19, 2019
Jun 12, 2019
Jun 18, 2018
Sep 20, 2019
Mar 8, 2019
Mar 11, 2019
Jul 28, 2019
Mar 8, 2019
Sep 30, 2018
Sep 19, 2018
Sep 26, 2019
Sep 26, 2019
Jul 2, 2019
Sep 20, 2019

Repository files navigation

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.

Table of Contents

Getting Started

Building

go get -u sigs.k8s.io/etcdadm

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 78.9%
  • Shell 20.0%
  • Makefile 1.1%