<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>etcd – Documentation versions</title><link>https://etcd.io/docs/</link><description>Recent content in Documentation versions on etcd</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://etcd.io/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: etcd client architecture</title><link>https://etcd.io/docs/v3.3/learning/client-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.3/learning/client-architecture/</guid><description>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>etcd server has proven its robustness with years of failure injection testing. Most complex application logic is already handled by etcd server and its data stores (e.g. cluster membership is transparent to clients, with Raft-layer forwarding proposals to leader). Although server components are correct, its composition with client requires a different set of intricate protocols to guarantee its correctness and high availability under faulty conditions. Ideally, etcd server provides one logical cluster view of many physical machines, and client implements automatic failover between replicas. This documents client architectural decisions and its implementation details.&lt;/p>
&lt;h2 id="glossary">Glossary&lt;/h2>
&lt;p>&lt;strong>clientv3&lt;/strong> &amp;mdash; etcd Official Go client for etcd v3 API.&lt;/p>
&lt;p>&lt;strong>clientv3-grpc1.0&lt;/strong> &amp;mdash; Official client implementation, with &lt;a href="https://github.com/grpc/grpc-go/releases/tag/v1.0.0" target="_blank" rel="noopener">grpc-go v1.0.x&lt;/a>, which is used in latest etcd v3.1.&lt;/p>
&lt;p>&lt;strong>clientv3-grpc1.7&lt;/strong> &amp;mdash; Official client implementation, with &lt;a href="https://github.com/grpc/grpc-go/releases/tag/v1.7.0" target="_blank" rel="noopener">grpc-go v1.7.x&lt;/a>, which is used in latest etcd v3.2 and v3.3.&lt;/p>
&lt;p>&lt;strong>clientv3-grpc1.14&lt;/strong> &amp;mdash; Official client implementation, with &lt;a href="https://github.com/grpc/grpc-go/releases/tag/v1.14.0" target="_blank" rel="noopener">grpc-go v1.14.x&lt;/a>, which is used in latest etcd v3.4.&lt;/p>
&lt;p>&lt;strong>Balancer&lt;/strong> &amp;mdash; etcd client load balancer that implements retry and failover mechanism. etcd client should automatically balance loads between multiple endpoints.&lt;/p>
&lt;p>&lt;strong>Endpoints&lt;/strong> &amp;mdash; A list of etcd server endpoints that clients can connect to. Typically, 3 or 5 client URLs of an etcd cluster.&lt;/p>
&lt;p>&lt;strong>Pinned endpoint&lt;/strong> &amp;mdash; When configured with multiple endpoints, &amp;lt;= v3.3 client balancer chooses only one endpoint to establish a TCP connection, in order to conserve total open connections to etcd cluster. In v3.4, balancer round-robins pinned endpoints for every request, thus distributing loads more evenly.&lt;/p>
&lt;p>&lt;strong>Client Connection&lt;/strong> &amp;mdash; TCP connection that has been established to an etcd server, via gRPC Dial.&lt;/p>
&lt;p>&lt;strong>Sub Connection&lt;/strong> &amp;mdash; gRPC SubConn interface. Each sub-connection contains a list of addresses. Balancer creates a SubConn from a list of resolved addresses. gRPC ClientConn can map to multiple SubConn (e.g. example.com resolves to &lt;code>10.10.10.1&lt;/code> and &lt;code>10.10.10.2&lt;/code> of two sub-connections). etcd v3.4 balancer employs internal resolver to establish one sub-connection for each endpoint.&lt;/p>
&lt;p>&lt;strong>Transient disconnect&lt;/strong> &amp;mdash; When gRPC server returns a status error of &lt;a href="https://godoc.org/google.golang.org/grpc/codes#Code" target="_blank" rel="noopener">code Unavailable&lt;/a>.&lt;/p>
&lt;h2 id="client-requirements">Client requirements&lt;/h2>
&lt;p>&lt;strong>Correctness&lt;/strong> &amp;mdash; Requests may fail in the presence of server faults. However, it never violates consistency guarantees: global ordering properties, never write corrupted data, at-most once semantics for mutable operations, watch never observes partial events, and so on.&lt;/p>
&lt;p>&lt;strong>Liveness&lt;/strong> &amp;mdash; Servers may fail or disconnect briefly. Clients should make progress in either way. Clients should &lt;a href="https://github.com/etcd-io/etcd/issues/8980" target="_blank" rel="noopener">never deadlock&lt;/a> waiting for a server to come back from offline, unless configured to do so. Ideally, clients detect unavailable servers with HTTP/2 ping and failover to other nodes with clear error messages.&lt;/p>
&lt;p>&lt;strong>Effectiveness&lt;/strong> &amp;mdash; Clients should operate effectively with minimum resources: previous TCP connections should be &lt;a href="https://github.com/etcd-io/etcd/issues/9212" target="_blank" rel="noopener">gracefully closed&lt;/a> after endpoint switch. Failover mechanism should effectively predict the next replica to connect, without wastefully retrying on failed nodes.&lt;/p>
&lt;p>&lt;strong>Portability&lt;/strong> &amp;mdash; Official client should be clearly documented and its implementation be applicable to other language bindings. Error handling between different language bindings should be consistent. Since etcd is fully committed to gRPC, implementation should be closely aligned with gRPC long-term design goals (e.g. pluggable retry policy should be compatible with &lt;a href="https://github.com/grpc/proposal/blob/master/A6-client-retries.md" target="_blank" rel="noopener">gRPC retry&lt;/a>). Upgrades between two client versions should be non-disruptive.&lt;/p>
&lt;h2 id="client-overview">Client overview&lt;/h2>
&lt;p>The etcd client implements the following components:&lt;/p>
&lt;ul>
&lt;li>balancer that establishes gRPC connections to an etcd cluster,&lt;/li>
&lt;li>API client that sends RPCs to an etcd server, and&lt;/li>
&lt;li>error handler that decides whether to retry a failed request or switch endpoints.&lt;/li>
&lt;/ul>
&lt;p>Languages may differ in how to establish an initial connection (e.g. configure TLS), how to encode and send Protocol Buffer messages to server, how to handle stream RPCs, and so on. However, errors returned from etcd server will be the same. So should be error handling and retry policy.&lt;/p>
&lt;p>For example, etcd server may return &lt;code>&amp;quot;rpc error: code = Unavailable desc = etcdserver: request timed out&amp;quot;&lt;/code>, which is transient error that expects retries. Or return &lt;code>rpc error: code = InvalidArgument desc = etcdserver: key is not provided&lt;/code>, which means request was invalid and should not be retried. Go client can parse errors with &lt;code>google.golang.org/grpc/status.FromError&lt;/code>, and Java client with &lt;code>io.grpc.Status.fromThrowable&lt;/code>.&lt;/p>
&lt;h3 id="clientv3-grpc10-balancer-overview">clientv3-grpc1.0: Balancer Overview&lt;/h3>
&lt;p>&lt;code>clientv3-grpc1.0&lt;/code> maintains multiple TCP connections when configured with multiple etcd endpoints. Then pick one address and use it to send all client requests. The pinned address is maintained until the client object is closed (see &lt;em>Figure 1&lt;/em>). When the client receives an error, it randomly picks another and retries.&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-01.png"/>
&lt;/figure>
&lt;h3 id="clientv3-grpc10-balancer-limitation">clientv3-grpc1.0: Balancer Limitation&lt;/h3>
&lt;p>&lt;code>clientv3-grpc1.0&lt;/code> opening multiple TCP connections may provide faster balancer failover but requires more resources. The balancer does not understand node’s health status or cluster membership. So, it is possible that balancer gets stuck with one failed or partitioned node.&lt;/p>
&lt;h3 id="clientv3-grpc17-balancer-overview">clientv3-grpc1.7: Balancer Overview&lt;/h3>
&lt;p>&lt;code>clientv3-grpc1.7&lt;/code> maintains only one TCP connection to a chosen etcd server. When given multiple cluster endpoints, a client first tries to connect to them all. As soon as one connection is up, balancer pins the address, closing others (see &lt;strong>Figure 2&lt;/strong>).&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-02.png"/>
&lt;/figure>
&lt;p>The pinned address is to be maintained until the client object is closed. An error, from server or client network fault, is sent to client error handler (see &lt;strong>Figure 3&lt;/strong>).&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-03.png"/>
&lt;/figure>
&lt;p>The client error handler takes an error from gRPC server, and decides whether to retry on the same endpoint, or to switch to other addresses, based on the error code and message (see &lt;strong>Figure 4&lt;/strong> and &lt;strong>Figure 5&lt;/strong>).&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-04.png"/>
&lt;/figure>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-05.png"/>
&lt;/figure>
&lt;p>Stream RPCs, such as Watch and KeepAlive, are often requested with no timeouts. Instead, client can send periodic HTTP/2 pings to check the status of a pinned endpoint; if the server does not respond to the ping, balancer switches to other endpoints (see &lt;strong>Figure 6&lt;/strong>).&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-06.png"/>
&lt;/figure>
&lt;h3 id="clientv3-grpc17-balancer-limitation">clientv3-grpc1.7: Balancer Limitation&lt;/h3>
&lt;p>&lt;code>clientv3-grpc1.7&lt;/code> balancer sends HTTP/2 keepalives to detect disconnects from streaming requests. It is a simple gRPC server ping mechanism and does not reason about cluster membership, thus unable to detect network partitions. Since partitioned gRPC server can still respond to client pings, balancer may get stuck with a partitioned node. Ideally, keepalive ping detects partition and triggers endpoint switch, before request time-out (see &lt;a href="https://github.com/etcd-io/etcd/issues/8673" target="_blank" rel="noopener">issue #8673&lt;/a> and &lt;strong>Figure 7&lt;/strong>).&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-07.png"/>
&lt;/figure>
&lt;p>&lt;code>clientv3-grpc1.7&lt;/code> balancer maintains a list of unhealthy endpoints. Disconnected addresses are added to “unhealthy” list, and considered unavailable until after wait duration, which is hard coded as dial timeout with default value 5-second. Balancer can have false positives on which endpoints are unhealthy. For instance, endpoint A may come back right after being blacklisted, but still unusable for next 5 seconds (see &lt;strong>Figure 8&lt;/strong>).&lt;/p>
&lt;p>&lt;code>clientv3-grpc1.0&lt;/code> suffered the same problems above.&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-08.png"/>
&lt;/figure>
&lt;p>Upstream gRPC Go had already migrated to new balancer interface. For example, &lt;code>clientv3-grpc1.7&lt;/code> underlying balancer implementation uses new gRPC balancer and tries to be consistent with old balancer behaviors. While its compatibility has been maintained reasonably well, etcd client still &lt;a href="https://github.com/grpc/grpc-go/issues/1649" target="_blank" rel="noopener">suffered from subtle breaking changes&lt;/a>. Furthermore, gRPC maintainer recommends &lt;a href="https://github.com/grpc/grpc-go/issues/1942#issuecomment-375368665" target="_blank" rel="noopener">not relying on the old balancer interface&lt;/a>. In general, to get better support from upstream, it is best to be in sync with latest gRPC releases. And new features, such as retry policy, may not be backported to gRPC 1.7 branch. Thus, both etcd server and client must migrate to latest gRPC versions.&lt;/p>
&lt;h3 id="clientv3-grpc114-balancer-overview">clientv3-grpc1.14: Balancer Overview&lt;/h3>
&lt;p>&lt;code>clientv3-grpc1.7&lt;/code> is so tightly coupled with old gRPC interface, that every single gRPC dependency upgrade broke client behavior. Majority of development and debugging efforts were devoted to fixing those client behavior changes. As a result, its implementation has become overly complicated with bad assumptions on server connectivities.&lt;/p>
&lt;p>The primary goal of &lt;code>clientv3-grpc1.14&lt;/code> is to simplify balancer failover logic; rather than maintaining a list of unhealthy endpoints, which may be stale, simply roundrobin to the next endpoint whenever client gets disconnected from the current endpoint. It does not assume endpoint status. Thus, no more complicated status tracking is needed (see &lt;em>Figure 8&lt;/em> and above). Upgrading to &lt;code>clientv3-grpc1.14&lt;/code> should be no issue; all changes were internal while keeping all the backward compatibilities.&lt;/p>
&lt;p>Internally, when given multiple endpoints, &lt;code>clientv3-grpc1.14&lt;/code> creates multiple sub-connections (one sub-connection per each endpoint), while &lt;code>clientv3-grpc1.7&lt;/code> creates only one connection to a pinned endpoint (see &lt;em>Figure 9&lt;/em>). For instance, in 5-node cluster, &lt;code>clientv3-grpc1.14&lt;/code> balancer would require 5 TCP connections, while &lt;code>clientv3-grpc1.7&lt;/code> only requires one. By preserving the pool of TCP connections, &lt;code>clientv3-grpc1.14&lt;/code> may consume more resources but provide more flexible load balancer with better failover performance. The default balancing policy is round robin but can be easily extended to support other types of balancers (e.g. power of two, pick leader, etc.). &lt;code>clientv3-grpc1.14&lt;/code> uses gRPC resolver group and implements balancer picker policy, in order to delegate complex balancing work to upstream gRPC. On the other hand, &lt;code>clientv3-grpc1.7&lt;/code> manually handles each gRPC connection and balancer failover, which complicates the implementation. &lt;code>clientv3-grpc1.14&lt;/code> implements retry in the gRPC interceptor chain that automatically handles gRPC internal errors and enables more advanced retry policies like backoff, while &lt;code>clientv3-grpc1.7&lt;/code> manually interprets gRPC errors for retries.&lt;/p>
&lt;figure>
&lt;img src="https://etcd.io/img/client-architecture-balancer-figure-09.png"/>
&lt;/figure>
&lt;h3 id="clientv3-grpc114-balancer-limitation">clientv3-grpc1.14: Balancer Limitation&lt;/h3>
&lt;p>Improvements can be made by caching the status of each endpoint. For instance, balancer can ping each server in advance to maintain a list of healthy candidates, and use this information when doing round-robin. Or when disconnected, balancer can prioritize healthy endpoints. This may complicate the balancer implementation, thus can be addressed in later versions.&lt;/p>
&lt;p>Client-side keepalive ping still does not reason about network partitions. Streaming request may get stuck with a partitioned node. Advanced health checking service need to be implemented to understand the cluster membership (see &lt;a href="https://github.com/etcd-io/etcd/issues/8673" target="_blank" rel="noopener">issue #8673&lt;/a> for more detail).&lt;/p>
&lt;p>Currently, retry logic is handled manually as an interceptor. This may be simplified via &lt;a href="https://github.com/grpc/proposal/blob/master/A6-client-retries.md" target="_blank" rel="noopener">official gRPC retries&lt;/a>.&lt;/p></description></item><item><title>Docs: Install</title><link>https://etcd.io/docs/v3.3/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.3/install/</guid><description>
&lt;h2 id="system-requirements">System requirements&lt;/h2>
&lt;p>The etcd performance benchmarks run etcd on 8 vCPU, 16GB RAM, 50GB SSD GCE
instances, but any relatively modern machine with low latency storage and a few
gigabytes of memory should suffice for most use cases. Applications with large
v2 data stores will require more memory than a large v3 data store since data is
kept in anonymous memory instead of memory mapped from a file. For running etcd
on a cloud provider, see the &lt;a href="../op-guide/hardware#example-hardware-configurations">Example hardware
configuration&lt;/a> documentation.&lt;/p>
&lt;h2 id="download-the-pre-built-binary">Download the pre-built binary&lt;/h2>
&lt;p>The easiest way to get etcd is to use one of the pre-built release binaries
which are available for OSX, Linux, Windows, appc, and Docker. Instructions for
using these binaries are on the &lt;a href="https://github.com/etcd-io/etcd/releases/" target="_blank" rel="noopener">GitHub releases page&lt;/a>.&lt;/p>
&lt;h2 id="build-the-latest-version">Build the latest version&lt;/h2>
&lt;p>For those wanting to try the very latest version, build etcd from the &lt;code>master&lt;/code>
branch. &lt;a href="https://golang.org/" target="_blank" rel="noopener">Go&lt;/a> version 1.9+ is required to build the latest
version of etcd. To ensure etcd is built against well-tested libraries, etcd
vendors its dependencies for official release binaries. However, etcd&amp;rsquo;s
vendoring is also optional to avoid potential import conflicts when embedding
the etcd server or using the etcd client.&lt;/p>
&lt;p>To build &lt;code>etcd&lt;/code> from the &lt;code>master&lt;/code> branch without a &lt;code>GOPATH&lt;/code> using the official
&lt;code>build&lt;/code> script:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ git clone https://github.com/etcd-io/etcd.git
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">cd&lt;/span> etcd
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ ./build
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To build a vendored &lt;code>etcd&lt;/code> from the &lt;code>master&lt;/code> branch via &lt;code>go get&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># GOPATH should be set&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">echo&lt;/span> &lt;span style="color:#000">$GOPATH&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/Users/example/go
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ go get -v go.etcd.io/etcd
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ go get -v go.etcd.io/etcd/etcdctl
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="test-the-installation">Test the installation&lt;/h2>
&lt;p>Check the etcd binary is built correctly by starting etcd and setting a key.&lt;/p>
&lt;h3 id="starting-etcd">Starting etcd&lt;/h3>
&lt;p>If etcd is built without using &lt;code>go get&lt;/code>, run the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ ./bin/etcd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If etcd is built using &lt;code>go get&lt;/code>, run the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">$GOPATH&lt;/span>/bin/etcd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="setting-a-key">Setting a key&lt;/h3>
&lt;p>Run the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ ./bin/etcdctl put foo bar
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>OK
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>(or &lt;code>$GOPATH/bin/etcdctl put foo bar&lt;/code> if etcdctl was installed with &lt;code>go get&lt;/code>)&lt;/p>
&lt;p>If OK is printed, then etcd is working!&lt;/p></description></item><item><title>Docs: Libraries and tools</title><link>https://etcd.io/docs/v3.3/integrations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.3/integrations/</guid><description>
&lt;p>&lt;strong>Tools&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/master/etcdctl" target="_blank" rel="noopener">etcdctl&lt;/a> - A command line client for etcd&lt;/li>
&lt;li>&lt;a href="https://web.archive.org/web/20190113041300/https://github.com/fanhattan/etcd-backup" target="_blank" rel="noopener">etcd-backup&lt;/a> - A powerful command line utility for dumping/restoring etcd - Supports v2&lt;/li>
&lt;li>&lt;a href="https://npmjs.org/package/etcd-dump" target="_blank" rel="noopener">etcd-dump&lt;/a> - Command line utility for dumping/restoring etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/xetorthio/etcd-fs" target="_blank" rel="noopener">etcd-fs&lt;/a> - FUSE filesystem for etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/rekby/etcddir" target="_blank" rel="noopener">etcddir&lt;/a> - Realtime sync etcd and local directory. Work with windows and linux.&lt;/li>
&lt;li>&lt;a href="https://github.com/henszey/etcd-browser" target="_blank" rel="noopener">etcd-browser&lt;/a> - A web-based key/value editor for etcd using AngularJS&lt;/li>
&lt;li>&lt;a href="https://github.com/datawisesystems/etcd-lock" target="_blank" rel="noopener">etcd-lock&lt;/a> - Master election &amp;amp; distributed r/w lock implementation using etcd - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/matishsiao/etcd-console" target="_blank" rel="noopener">etcd-console&lt;/a> - A web-base key/value editor for etcd using PHP&lt;/li>
&lt;li>&lt;a href="https://github.com/nikfoundas/etcd-viewer" target="_blank" rel="noopener">etcd-viewer&lt;/a> - An etcd key-value store editor/viewer written in Java&lt;/li>
&lt;li>&lt;a href="https://github.com/mickep76/etcdtool" target="_blank" rel="noopener">etcdtool&lt;/a> - Export/Import/Edit etcd directory as JSON/YAML/TOML and Validate directory using JSON schema&lt;/li>
&lt;li>&lt;a href="https://web.archive.org/web/20190113041300/https://github.com/mickep76/etcdrest" target="_blank" rel="noopener">etcd-rest&lt;/a> - Create generic REST API in Go using etcd as a backend with validation using JSON schema&lt;/li>
&lt;li>&lt;a href="https://web.archive.org/web/20190113041250/https://github.com/kamilhark/etcdsh" target="_blank" rel="noopener">etcdsh&lt;/a> - A command line client with support of command history and tab completion. Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/sinsharat/etcdloadtest" target="_blank" rel="noopener">etcdloadtest&lt;/a> - A command line load test client for etcd version 3.0 and above.&lt;/li>
&lt;li>&lt;a href="https://github.com/ringtail/lucas" target="_blank" rel="noopener">lucas&lt;/a> - A web-based key-value viewer for kubernetes etcd3.0+ cluster.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Go libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/main/client/v3" target="_blank" rel="noopener">etcd/client/v3&lt;/a> - the officially maintained Go client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/release-3.3/client/" target="_blank" rel="noopener">etcd/client/v2&lt;/a> - the officially maintained Go client for v2&lt;/li>
&lt;li>&lt;a href="https://github.com/coreos/go-etcd" target="_blank" rel="noopener">go-etcd&lt;/a> - the deprecated official client. May be useful for older (&amp;lt;2.0.0) versions of etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/lumjjb/etcd/tree/enc_wrapper/clientwrap/encwrapper" target="_blank" rel="noopener">encWrapper&lt;/a> - encWrapper is an encryption wrapper for the etcd client Keys API/KV.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Java libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/jetcd" target="_blank" rel="noopener">coreos/jetcd&lt;/a> - Supports v3&lt;/li>
&lt;li>&lt;a href="https://github.com/boonproject/boon/blob/master/etcd/README.md" target="_blank" rel="noopener">boonproject/etcd&lt;/a> - Supports v2, Async/Sync and waits&lt;/li>
&lt;li>&lt;a href="https://github.com/justinsb/jetcd" target="_blank" rel="noopener">justinsb/jetcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/diwakergupta/jetcd" target="_blank" rel="noopener">diwakergupta/jetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jurmous/etcd4j" target="_blank" rel="noopener">jurmous/etcd4j&lt;/a> - Supports v2, Async/Sync, waits and SSL&lt;/li>
&lt;li>&lt;a href="http://github.com/AdoHe/etcd4j" target="_blank" rel="noopener">AdoHe/etcd4j&lt;/a> - Supports v2 (enhance for real production cluster)&lt;/li>
&lt;li>&lt;a href="https://github.com/cdancy/etcd-rest" target="_blank" rel="noopener">cdancy/etcd-rest&lt;/a> - Uses jclouds to provide a complete implementation of v2 API.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Scala libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/maciej/etcd-client" target="_blank" rel="noopener">maciej/etcd-client&lt;/a> - Supports v2. Akka HTTP-based fully async client&lt;/li>
&lt;li>&lt;a href="https://bitbucket.org/eiipii/etcdhttpclient" target="_blank" rel="noopener">eiipii/etcdhttpclient&lt;/a> - Supports v2. Async HTTP client based on Netty and Scala Futures.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Perl libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/hexfusion/perl-net-etcd" target="_blank" rel="noopener">hexfusion/perl-net-etcd&lt;/a> - Supports v3 grpc gateway HTTP API&lt;/li>
&lt;li>&lt;a href="https://github.com/robn/p5-etcd" target="_blank" rel="noopener">robn/p5-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Python libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/kragniz/python-etcd3" target="_blank" rel="noopener">kragniz/python-etcd3&lt;/a> - Client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/jplana/python-etcd" target="_blank" rel="noopener">jplana/python-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/russellhaering/txetcd" target="_blank" rel="noopener">russellhaering/txetcd&lt;/a> - a Twisted Python library&lt;/li>
&lt;li>&lt;a href="https://github.com/cholcombe973/autodock" target="_blank" rel="noopener">cholcombe973/autodock&lt;/a> - A docker deployment automation tool&lt;/li>
&lt;li>&lt;a href="https://github.com/lisael/aioetcd" target="_blank" rel="noopener">lisael/aioetcd&lt;/a> - (Python 3.4+) Asyncio coroutines client (Supports v2)&lt;/li>
&lt;li>&lt;a href="https://github.com/crossbario/txaio-etcd" target="_blank" rel="noopener">txaio-etcd&lt;/a> - Asynchronous etcd v3-only client library for Twisted (today) and asyncio (future)&lt;/li>
&lt;li>&lt;a href="https://github.com/dims/etcd3-gateway" target="_blank" rel="noopener">dims/etcd3-gateway&lt;/a> - etcd v3 API library using the HTTP grpc gateway&lt;/li>
&lt;li>&lt;a href="https://github.com/gaopeiliang/aioetcd3" target="_blank" rel="noopener">aioetcd3&lt;/a> - (Python 3.6+) etcd v3 API for asyncio&lt;/li>
&lt;li>&lt;a href="https://github.com/Revolution1/etcd3-py" target="_blank" rel="noopener">Revolution1/etcd3-py&lt;/a> - (python2.7 and python3.5+) Python client for etcd v3, using gRPC-JSON-Gateway&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Node libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/stianeikeland/node-etcd" target="_blank" rel="noopener">stianeikeland/node-etcd&lt;/a> - Supports v2 (w Coffeescript)&lt;/li>
&lt;li>&lt;a href="https://github.com/lavagetto/nodejs-etcd" target="_blank" rel="noopener">lavagetto/nodejs-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/deedubs/node-etcd-config" target="_blank" rel="noopener">deedubs/node-etcd-config&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Ruby libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/iconara/etcd-rb" target="_blank" rel="noopener">iconara/etcd-rb&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/jpfuentes2/etcd-ruby" target="_blank" rel="noopener">jpfuentes2/etcd-ruby&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ranjib/etcd-ruby" target="_blank" rel="noopener">ranjib/etcd-ruby&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/davissp14/etcdv3-ruby" target="_blank" rel="noopener">davissp14/etcdv3-ruby&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>C libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/apache/celix/tree/master/libs/etcdlib" target="_blank" rel="noopener">apache/celix/etcdlib&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jdarcy/etcd-api" target="_blank" rel="noopener">jdarcy/etcd-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/shafreeck/cetcd" target="_blank" rel="noopener">shafreeck/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>C++ libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/edwardcapriolo/etcdcpp" target="_blank" rel="noopener">edwardcapriolo/etcdcpp&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/suryanathan/etcdcpp" target="_blank" rel="noopener">suryanathan/etcdcpp&lt;/a> - Supports v2 (with waits)&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-api" target="_blank" rel="noopener">nokia/etcd-cpp-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-apiv3" target="_blank" rel="noopener">nokia/etcd-cpp-apiv3&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Clojure libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/aterreno/etcd-clojure" target="_blank" rel="noopener">aterreno/etcd-clojure&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/dwwoelfel/cetcd" target="_blank" rel="noopener">dwwoelfel/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/rthomas/clj-etcd" target="_blank" rel="noopener">rthomas/clj-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Erlang libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/marshall-lee/etcd.erl" target="_blank" rel="noopener">marshall-lee/etcd.erl&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/zhongwencool/eetcd" target="_blank" rel="noopener">zhongwencool/eetcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>.Net Libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wangjia184/etcdnet" target="_blank" rel="noopener">wangjia184/etcdnet&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/drusellers/etcetera" target="_blank" rel="noopener">drusellers/etcetera&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/shubhamranjan/dotnet-etcd" target="_blank" rel="noopener">shubhamranjan/dotnet-etcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>PHP Libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/linkorb/etcd-php" target="_blank" rel="noopener">linkorb/etcd-php&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/activecollab/etcd" target="_blank" rel="noopener">activecollab/etcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ouqiang/etcd-php" target="_blank" rel="noopener">ouqiang/etcd-php&lt;/a> - Client for v3 gRPC gateway&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Haskell libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wereHamster/etcd-hs" target="_blank" rel="noopener">wereHamster/etcd-hs&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>R libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/ropensci/etseed" target="_blank" rel="noopener">ropensci/etseed&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Nim libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/FedericoCeratto/nim-etcd-client" target="_blank" rel="noopener">etcd_client&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Tcl libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/efrecon/etcd-tcl" target="_blank" rel="noopener">efrecon/etcd-tcl&lt;/a> - Supports v2, except wait.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Rust libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/jimmycuadra/rust-etcd" target="_blank" rel="noopener">jimmycuadra/rust-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Gradle Plugins&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cdancy/gradle-etcd-rest-plugin" target="_blank" rel="noopener">gradle-etcd-rest-plugin&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Chef Integration&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/coderanger/etcd-chef" target="_blank" rel="noopener">coderanger/etcd-chef&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Chef Cookbook&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/spheromak/etcd-cookbook" target="_blank" rel="noopener">spheromak/etcd-cookbook&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>BOSH Releases&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cloudfoundry-community/etcd-boshrelease" target="_blank" rel="noopener">cloudfoundry-community/etcd-boshrelease&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/cloudfoundry/cf-release/tree/master/jobs/etcd" target="_blank" rel="noopener">cloudfoundry/cf-release&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Projects using etcd&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/blob/v3.3.13/raft/README.md#notable-users" target="_blank" rel="noopener">etcd Raft users&lt;/a> - projects using etcd&amp;rsquo;s raft library implementation.&lt;/li>
&lt;li>&lt;a href="https://github.com/apache/celix" target="_blank" rel="noopener">apache/celix&lt;/a> - an implementation of the OSGi specification adapted to C and C++&lt;/li>
&lt;li>&lt;a href="https://github.com/binocarlos/yoda" target="_blank" rel="noopener">binocarlos/yoda&lt;/a> - etcd + ZeroMQ&lt;/li>
&lt;li>&lt;a href="https://github.com/blox/blox" target="_blank" rel="noopener">blox/blox&lt;/a> - a collection of open source projects for container management and orchestration with AWS ECS&lt;/li>
&lt;li>&lt;a href="https://github.com/calavera/active-proxy" target="_blank" rel="noopener">calavera/active-proxy&lt;/a> - HTTP Proxy configured with etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/chain/chain" target="_blank" rel="noopener">chain/chain&lt;/a> - software designed to operate and connect to highly scalable permissioned blockchain networks&lt;/li>
&lt;li>&lt;a href="https://github.com/derekchiang/etcdplus" target="_blank" rel="noopener">derekchiang/etcdplus&lt;/a> - A set of distributed synchronization primitives built upon etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/flynn/go-discover" target="_blank" rel="noopener">go-discover&lt;/a> - service discovery in Go&lt;/li>
&lt;li>&lt;a href="https://github.com/gleicon/goreman/tree/etcd" target="_blank" rel="noopener">gleicon/goreman&lt;/a> - Branch of the Go Foreman clone with etcd support&lt;/li>
&lt;li>&lt;a href="https://github.com/garethr/hiera-etcd" target="_blank" rel="noopener">garethr/hiera-etcd&lt;/a> - Puppet hiera backend using etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcd-vim" target="_blank" rel="noopener">mattn/etcd-vim&lt;/a> - SET and GET keys from inside vim&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcdenv" target="_blank" rel="noopener">mattn/etcdenv&lt;/a> - &amp;ldquo;env&amp;rdquo; shebang with etcd integration&lt;/li>
&lt;li>&lt;a href="https://github.com/kelseyhightower/confd" target="_blank" rel="noopener">kelseyhightower/confd&lt;/a> - Manage local app config files using templates and data from etcd&lt;/li>
&lt;li>&lt;a href="https://git.autistici.org/ai/configdb/tree/master" target="_blank" rel="noopener">configdb&lt;/a> - A REST relational abstraction on top of arbitrary database backends, aimed at storing configs and inventories.&lt;/li>
&lt;li>&lt;a href="https://github.com/kubernetes/kubernetes" target="_blank" rel="noopener">kubernetes/kubernetes&lt;/a> - Container cluster manager introduced by Google.&lt;/li>
&lt;li>&lt;a href="https://github.com/mailgun/vulcand" target="_blank" rel="noopener">mailgun/vulcand&lt;/a> - HTTP proxy that uses etcd as a configuration backend.&lt;/li>
&lt;li>&lt;a href="https://github.com/duedil-ltd/discodns" target="_blank" rel="noopener">duedil-ltd/discodns&lt;/a> - Simple DNS nameserver using etcd as a database for names and records.&lt;/li>
&lt;li>&lt;a href="https://github.com/skynetservices/skydns" target="_blank" rel="noopener">skynetservices/skydns&lt;/a> - RFC compliant DNS server&lt;/li>
&lt;li>&lt;a href="https://github.com/xordataexchange/crypt" target="_blank" rel="noopener">xordataexchange/crypt&lt;/a> - Securely store values in etcd using GPG encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/spf13/viper" target="_blank" rel="noopener">spf13/viper&lt;/a> - Go configuration library, reads values from ENV, pflags, files, and etcd with optional encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/lytics/metafora" target="_blank" rel="noopener">lytics/metafora&lt;/a> - Go distributed task library&lt;/li>
&lt;li>&lt;a href="https://github.com/ryandoyle/nss-etcd" target="_blank" rel="noopener">ryandoyle/nss-etcd&lt;/a> - A GNU libc NSS module for resolving names from etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/dnaeon/gru" target="_blank" rel="noopener">Gru&lt;/a> - Orchestration made easy with Go&lt;/li>
&lt;li>&lt;a href="http://vitess.io/" target="_blank" rel="noopener">Vitess&lt;/a> - Vitess is a database clustering system for horizontal scaling of MySQL.&lt;/li>
&lt;li>&lt;a href="https://github.com/lclarkmichalek/etcdhcp" target="_blank" rel="noopener">lclarkmichalek/etcdhcp&lt;/a> - DHCP server that uses etcd for persistence and coordination.&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/networking-vpp" target="_blank" rel="noopener">openstack/networking-vpp&lt;/a> - A networking driver that programs the &lt;a href="https://wiki.fd.io/view/VPP" target="_blank" rel="noopener">FD.io VPP dataplane&lt;/a> to provide &lt;a href="https://www.openstack.org/" target="_blank" rel="noopener">OpenStack&lt;/a> cloud virtual networking&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/governance/blob/master/reference/base-services.rst" target="_blank" rel="noopener">OpenStack&lt;/a> - OpenStack services can rely on etcd as a base service.&lt;/li>
&lt;li>&lt;a href="https://github.com/coredns/coredns/tree/master/plugin/etcd" target="_blank" rel="noopener">CoreDNS&lt;/a> - CoreDNS is a DNS server that chains plugins, part of CNCF and Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/m3db/m3" target="_blank" rel="noopener">Uber M3&lt;/a> - M3: Uber’s Open Source, Large-scale Metrics Platform for Prometheus&lt;/li>
&lt;li>&lt;a href="https://github.com/rook/rook" target="_blank" rel="noopener">Rook&lt;/a> - Storage Orchestration for Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/zalando/patroni" target="_blank" rel="noopener">Patroni&lt;/a> - A template for PostgreSQL High Availability with ZooKeeper, etcd, or Consul&lt;/li>
&lt;li>&lt;a href="https://github.com/google/trillian" target="_blank" rel="noopener">Trillian&lt;/a> - Trillian implements a Merkle tree whose contents are served from a data storage layer, to allow scalability to extremely large trees.&lt;/li>
&lt;/ul></description></item><item><title>Docs: Metrics</title><link>https://etcd.io/docs/v3.3/metrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.3/metrics/</guid><description>
&lt;p>etcd uses &lt;a href="http://prometheus.io/" target="_blank" rel="noopener">Prometheus&lt;/a> for metrics reporting. The metrics can be used for real-time monitoring and debugging. etcd does not persist its metrics; if a member restarts, the metrics will be reset.&lt;/p>
&lt;p>The simplest way to see the available metrics is to cURL the metrics endpoint &lt;code>/metrics&lt;/code>. The format is described &lt;a href="http://prometheus.io/docs/instrumenting/exposition_formats/" target="_blank" rel="noopener">here&lt;/a>.&lt;/p>
&lt;p>Follow the &lt;a href="http://prometheus.io/docs/introduction/getting_started/" target="_blank" rel="noopener">Prometheus getting started doc&lt;/a> to spin up a Prometheus server to collect etcd metrics.&lt;/p>
&lt;p>The naming of metrics follows the suggested &lt;a href="http://prometheus.io/docs/practices/naming/" target="_blank" rel="noopener">Prometheus best practices&lt;/a>. A metric name has an &lt;code>etcd&lt;/code> or &lt;code>etcd_debugging&lt;/code> prefix as its namespace and a subsystem prefix (for example &lt;code>wal&lt;/code> and &lt;code>etcdserver&lt;/code>).&lt;/p>
&lt;h2 id="etcd-namespace-metrics">etcd namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd&lt;/code> prefix are for monitoring and alerting. They are stable high level metrics. If there is any change of these metrics, it will be included in release notes.&lt;/p>
&lt;p>Metrics that are etcd2 related are documented &lt;a href="https://etcd.io/docs/v2.3/metrics/#http-requests">v2 metrics guide&lt;/a>.&lt;/p>
&lt;h3 id="server">Server&lt;/h3>
&lt;p>These metrics describe the status of the etcd server. In order to detect outages or problems for troubleshooting, the server metrics of every production etcd cluster should be closely monitored.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_server_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>has_leader&lt;/td>
&lt;td>Whether or not a leader exists. 1 is existence, 0 is not.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>leader_changes_seen_total&lt;/td>
&lt;td>The number of leader changes seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_committed_total&lt;/td>
&lt;td>The total number of consensus proposals committed.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_applied_total&lt;/td>
&lt;td>The total number of consensus proposals applied.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_pending&lt;/td>
&lt;td>The current number of pending proposals.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_failed_total&lt;/td>
&lt;td>The total number of failed proposals seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>has_leader&lt;/code> indicates whether the member has a leader. If a member does not have a leader, it is
totally unavailable. If all the members in the cluster do not have any leader, the entire cluster
is totally unavailable.&lt;/p>
&lt;p>&lt;code>leader_changes_seen_total&lt;/code> counts the number of leader changes the member has seen since its start. Rapid leadership changes impact the performance of etcd significantly. It also signals that the leader is unstable, perhaps due to network connectivity issues or excessive load hitting the etcd cluster.&lt;/p>
&lt;p>&lt;code>proposals_committed_total&lt;/code> records the total number of consensus proposals committed. This gauge should increase over time if the cluster is healthy. Several healthy members of an etcd cluster may have different total committed proposals at once. This discrepancy may be due to recovering from peers after starting, lagging behind the leader, or being the leader and therefore having the most commits. It is important to monitor this metric across all the members in the cluster; a consistently large lag between a single member and its leader indicates that member is slow or unhealthy.&lt;/p>
&lt;p>&lt;code>proposals_applied_total&lt;/code> records the total number of consensus proposals applied. The etcd server applies every committed proposal asynchronously. The difference between &lt;code>proposals_committed_total&lt;/code> and &lt;code>proposals_applied_total&lt;/code> should usually be small (within a few thousands even under high load). If the difference between them continues to rise, it indicates that the etcd server is overloaded. This might happen when applying expensive queries like heavy range queries or large txn operations.&lt;/p>
&lt;p>&lt;code>proposals_pending&lt;/code> indicates how many proposals are queued to commit. Rising pending proposals suggests there is a high client load or the member cannot commit proposals.&lt;/p>
&lt;p>&lt;code>proposals_failed_total&lt;/code> are normally related to two issues: temporary failures related to a leader election or longer downtime caused by a loss of quorum in the cluster.&lt;/p>
&lt;h3 id="disk">Disk&lt;/h3>
&lt;p>These metrics describe the status of the disk operations.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_disk_&lt;/code>.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>wal_fsync_duration_seconds&lt;/td>
&lt;td>The latency distributions of fsync called by wal&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>backend_commit_duration_seconds&lt;/td>
&lt;td>The latency distributions of commit called by backend.&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>A &lt;code>wal_fsync&lt;/code> is called when etcd persists its log entries to disk before applying them.&lt;/p>
&lt;p>A &lt;code>backend_commit&lt;/code> is called when etcd commits an incremental snapshot of its most recent changes to disk.&lt;/p>
&lt;p>High disk operation latencies (&lt;code>wal_fsync_duration_seconds&lt;/code> or &lt;code>backend_commit_duration_seconds&lt;/code>) often indicate disk issues. It may cause high request latency or make the cluster unstable.&lt;/p>
&lt;h3 id="network">Network&lt;/h3>
&lt;p>These metrics describe the status of the network.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_network_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>peer_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_sent_failures_total&lt;/td>
&lt;td>The total number of send failures from the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_failures_total&lt;/td>
&lt;td>The total number of receive failures from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_round_trip_time_seconds&lt;/td>
&lt;td>Round-Trip-Time histogram between peers.&lt;/td>
&lt;td>Histogram(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>peer_sent_bytes_total&lt;/code> counts the total number of bytes sent to a specific peer. Usually the leader member sends more data than other members since it is responsible for transmitting replicated data.&lt;/p>
&lt;p>&lt;code>peer_received_bytes_total&lt;/code> counts the total number of bytes received from a specific peer. Usually follower members receive data only from the leader member.&lt;/p>
&lt;h3 id="grpc-requests">gRPC requests&lt;/h3>
&lt;p>These metrics are exposed via &lt;a href="https://github.com/grpc-ecosystem/go-grpc-prometheus" target="_blank" rel="noopener">go-grpc-prometheus&lt;/a>.&lt;/p>
&lt;h2 id="etcd_debugging-namespace-metrics">etcd_debugging namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd_debugging&lt;/code> prefix are for debugging. They are very implementation dependent and volatile. They might be changed or removed without any warning in new etcd releases. Some of the metrics might be moved to the &lt;code>etcd&lt;/code> prefix when they become more stable.&lt;/p>
&lt;h3 id="snapshot">Snapshot&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>snapshot_save_total_duration_seconds&lt;/td>
&lt;td>The total latency distributions of save called by snapshot&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Abnormally high snapshot duration (&lt;code>snapshot_save_total_duration_seconds&lt;/code>) indicates disk issues and might cause the cluster to be unstable.&lt;/p>
&lt;h2 id="prometheus-supplied-metrics">Prometheus supplied metrics&lt;/h2>
&lt;p>The Prometheus client library provides a number of metrics under the &lt;code>go&lt;/code> and &lt;code>process&lt;/code> namespaces. There are a few that are particularly interesting.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>process_open_fds&lt;/td>
&lt;td>Number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>process_max_fds&lt;/td>
&lt;td>Maximum number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Heavy file descriptor (&lt;code>process_open_fds&lt;/code>) usage (i.e., near the process&amp;rsquo;s file descriptor limit, &lt;code>process_max_fds&lt;/code>) indicates a potential file descriptor exhaustion issue. If the file descriptors are exhausted, etcd may panic because it cannot create new WAL files.&lt;/p>
&lt;h2 id="generated-list-of-metrics">Generated list of metrics&lt;/h2>
&lt;table>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.3.0.txt">v3.3.0&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.1.txt">v3.3.1&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.10.txt">v3.3.10&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.11.txt">v3.3.11&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.12.txt">v3.3.12&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.13.txt">v3.3.13&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.3.14.txt">v3.3.14&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.15.txt">v3.3.15&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.16.txt">v3.3.16&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.17.txt">v3.3.17&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.18.txt">v3.3.18&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.19.txt">v3.3.19&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.3.2.txt">v3.3.2&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.20.txt">v3.3.20&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.21.txt">v3.3.21&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.22.txt">v3.3.22&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.23.txt">v3.3.23&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.24.txt">v3.3.24&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.3.3.txt">v3.3.3&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.4.txt">v3.3.4&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.5.txt">v3.3.5&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.6.txt">v3.3.6&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.7.txt">v3.3.7&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.3.8.txt">v3.3.8&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.3.9.txt">v3.3.9&lt;/a>&lt;/td>
&lt;/table></description></item><item><title>Docs: How to Set Up a Demo etcd Cluster</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-setup-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-setup-cluster/</guid><description>
&lt;p>&lt;img alt="01_etcd_clustering_2016050601" src="https://storage.googleapis.com/etcd/demo/01_etcd_clustering_2016051001.gif">&lt;/p>
&lt;p>On each etcd node, specify the cluster members:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>token-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Run this on each machine:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Or use our public discovery service:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl https://discovery.etcd.io/new?size&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># grab this token&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>token-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now etcd is ready! To connect to etcd with etcdctl:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$HOST_1&lt;/span>:2379,&lt;span style="color:#000">$HOST_2&lt;/span>:2379,&lt;span style="color:#000">$HOST_3&lt;/span>:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> member list
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to Set Up a Demo etcd Cluster</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-setup-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-setup-cluster/</guid><description>
&lt;p>&lt;img alt="01_etcd_clustering_2016050601" src="https://storage.googleapis.com/etcd/demo/01_etcd_clustering_2016051001.gif">&lt;/p>
&lt;p>On each etcd node, specify the cluster members:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>token-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Run this on each machine:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Or use our public discovery service:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl https://discovery.etcd.io/new?size&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># grab this token&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>token-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now etcd is ready! To connect to etcd with etcdctl:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$HOST_1&lt;/span>:2379,&lt;span style="color:#000">$HOST_2&lt;/span>:2379,&lt;span style="color:#000">$HOST_3&lt;/span>:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> member list
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to access etcd</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-access-etcd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-access-etcd/</guid><description>
&lt;p>&lt;img alt="02_etcdctl_access_etcd_2016051001" src="https://storage.googleapis.com/etcd/demo/02_etcdctl_access_etcd_2016051001.gif">&lt;/p>
&lt;p>&lt;code>put&lt;/code> command to write:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put foo &lt;span style="color:#4e9a06">&amp;#34;Hello World!&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>get&lt;/code> to read from etcd:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;json&amp;#34;&lt;/span> get foo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to access etcd</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-access-etcd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-access-etcd/</guid><description>
&lt;p>&lt;img alt="02_etcdctl_access_etcd_2016051001" src="https://storage.googleapis.com/etcd/demo/02_etcdctl_access_etcd_2016051001.gif">&lt;/p>
&lt;p>&lt;code>put&lt;/code> command to write:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put foo &lt;span style="color:#4e9a06">&amp;#34;Hello World!&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>get&lt;/code> to read from etcd:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;json&amp;#34;&lt;/span> get foo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to get keys by prefix</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-get-key-by-prefix/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-get-key-by-prefix/</guid><description>
&lt;p>&lt;img alt="03_etcdctl_get_by_prefix_2016050501" src="https://storage.googleapis.com/etcd/demo/03_etcdctl_get_by_prefix_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web1 value1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web2 value2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web3 value3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get web --prefix
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to get keys by prefix</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-get-key-by-prefix/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-get-key-by-prefix/</guid><description>
&lt;p>&lt;img alt="03_etcdctl_get_by_prefix_2016050501" src="https://storage.googleapis.com/etcd/demo/03_etcdctl_get_by_prefix_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web1 value1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web2 value2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web3 value3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get web --prefix
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to delete keys</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-delete-keys/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-delete-keys/</guid><description>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>Install &lt;a href="https://etcd.io/docs/v3.5/install/" target="_blank" rel="noopener">&lt;code>etcd&lt;/code> and &lt;code>etcdctl&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="add-or-delete-keys">Add or delete keys&lt;/h2>
&lt;p>&lt;code>del&lt;/code> to remove the specified key or range of keys:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>etcdctl del &lt;span style="color:#000">$KEY&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#000">$END_KEY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options">Options&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>--prefix&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: delete keys with matching prefix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--prev-kv&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: &lt;span style="color:#204a87;font-weight:bold">return&lt;/span> deleted key-value pairs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--from-key&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: delete keys that are greater than or equal to the given key using byte compare
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--range&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: delete range of keys without delay
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options-inherited-from-parent-commands">Options inherited from parent commands&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>--endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;127.0.0.1:2379&amp;#34;&lt;/span>: gRPC endpoints
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="examples">Examples&lt;/h3>
&lt;p>&lt;img alt="04_etcdctl_delete_2016050601" src="https://storage.googleapis.com/etcd/demo/04_etcdctl_delete_2016050601.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put key myvalue
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> del key
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put k1 value1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put k2 value2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> del k --prefix
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to delete keys</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-delete-keys/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-delete-keys/</guid><description>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>Install &lt;a href="https://etcd.io/docs/v3.6/install/" target="_blank" rel="noopener">&lt;code>etcd&lt;/code> and &lt;code>etcdctl&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="add-or-delete-keys">Add or delete keys&lt;/h2>
&lt;p>&lt;code>del&lt;/code> to remove the specified key or range of keys:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>etcdctl del &lt;span style="color:#000">$KEY&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#000">$END_KEY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options">Options&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>--prefix&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: delete keys with matching prefix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--prev-kv&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: &lt;span style="color:#204a87;font-weight:bold">return&lt;/span> deleted key-value pairs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--from-key&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: delete keys that are greater than or equal to the given key using byte compare
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--range&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: delete range of keys without delay
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options-inherited-from-parent-commands">Options inherited from parent commands&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>--endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;127.0.0.1:2379&amp;#34;&lt;/span>: gRPC endpoints
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="examples">Examples&lt;/h3>
&lt;p>&lt;img alt="04_etcdctl_delete_2016050601" src="https://storage.googleapis.com/etcd/demo/04_etcdctl_delete_2016050601.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put key myvalue
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> del key
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put k1 value1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put k2 value2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> del k --prefix
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to make multiple writes in a transaction</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-transactional-write/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-transactional-write/</guid><description>
&lt;p>&lt;code>txn&lt;/code> to wrap multiple requests into one transaction:&lt;/p>
&lt;p>&lt;img alt="05_etcdctl_transaction_2016050501" src="https://storage.googleapis.com/etcd/demo/05_etcdctl_transaction_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put user1 bad
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> txn --interactive
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>compares:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>value&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;user1&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;bad&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>success requests &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>get, put, delete&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>del user1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>failure requests &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>get, put, delete&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>put user1 good
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to make multiple writes in a transaction</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-transactional-write/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-transactional-write/</guid><description>
&lt;p>&lt;code>txn&lt;/code> to wrap multiple requests into one transaction:&lt;/p>
&lt;p>&lt;img alt="05_etcdctl_transaction_2016050501" src="https://storage.googleapis.com/etcd/demo/05_etcdctl_transaction_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put user1 bad
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> txn --interactive
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>compares:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>value&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;user1&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;bad&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>success requests &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>get, put, delete&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>del user1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>failure requests &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>get, put, delete&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>put user1 good
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to watch keys</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-watch-keys/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-watch-keys/</guid><description>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>Install &lt;a href="https://etcd.io/docs/v3.5/install/" target="_blank" rel="noopener">&lt;code>etcd&lt;/code> and &lt;code>etcdctl&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="watching-keys">Watching keys&lt;/h2>
&lt;p>&lt;code>watch&lt;/code> to get notified of future changes:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>etcdctl watch &lt;span style="color:#000">$KEY&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#000">$END_KEY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options">Options&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>-i, --interactive&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: interactive mode
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--prefix&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: watch on a prefix &lt;span style="color:#204a87;font-weight:bold">if&lt;/span> prefix is &lt;span style="color:#204a87">set&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--rev&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>0: Revision to start watching
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--prev-kv&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: get the previous key-value pair before the event happens
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--progress-notify&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: get periodic watch progress notification from server
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options-inherited-from-parent-commands">Options inherited from parent commands&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>--endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;127.0.0.1:2379&amp;#34;&lt;/span>: gRPC endpoints
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="examples">Examples&lt;/h3>
&lt;p>&lt;img alt="06_etcdctl_watch_2016050501" src="https://storage.googleapis.com/etcd/demo/06_etcdctl_watch_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> watch stock1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock1 &lt;span style="color:#0000cf;font-weight:bold">1000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> watch stock --prefix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock1 &lt;span style="color:#0000cf;font-weight:bold">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock2 &lt;span style="color:#0000cf;font-weight:bold">20&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to watch keys</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-watch-keys/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-watch-keys/</guid><description>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>Install &lt;a href="https://etcd.io/docs/v3.6/install/" target="_blank" rel="noopener">&lt;code>etcd&lt;/code> and &lt;code>etcdctl&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="watching-keys">Watching keys&lt;/h2>
&lt;p>&lt;code>watch&lt;/code> to get notified of future changes:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>etcdctl watch &lt;span style="color:#000">$KEY&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#000">$END_KEY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options">Options&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>-i, --interactive&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: interactive mode
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--prefix&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: watch on a prefix &lt;span style="color:#204a87;font-weight:bold">if&lt;/span> prefix is &lt;span style="color:#204a87">set&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--rev&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>0: Revision to start watching
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--prev-kv&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: get the previous key-value pair before the event happens
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--progress-notify&lt;span style="color:#ce5c00;font-weight:bold">[=&lt;/span>false&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>: get periodic watch progress notification from server
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="options-inherited-from-parent-commands">Options inherited from parent commands&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>--endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;127.0.0.1:2379&amp;#34;&lt;/span>: gRPC endpoints
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="examples">Examples&lt;/h3>
&lt;p>&lt;img alt="06_etcdctl_watch_2016050501" src="https://storage.googleapis.com/etcd/demo/06_etcdctl_watch_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> watch stock1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock1 &lt;span style="color:#0000cf;font-weight:bold">1000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> watch stock --prefix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock1 &lt;span style="color:#0000cf;font-weight:bold">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock2 &lt;span style="color:#0000cf;font-weight:bold">20&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to create lease</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-create-lease/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-create-lease/</guid><description>
&lt;p>&lt;code>lease&lt;/code> to write with TTL:&lt;/p>
&lt;p>&lt;img alt="07_etcdctl_lease_2016050501" src="https://storage.googleapis.com/etcd/demo/07_etcdctl_lease_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease grant &lt;span style="color:#0000cf;font-weight:bold">300&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># lease 2be7547fbc6a5afa granted with TTL(300s)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put sample value --lease&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get sample
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease keep-alive 2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease revoke 2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># or after 300 seconds&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get sample
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to create lease</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-create-lease/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-create-lease/</guid><description>
&lt;p>&lt;code>lease&lt;/code> to write with TTL:&lt;/p>
&lt;p>&lt;img alt="07_etcdctl_lease_2016050501" src="https://storage.googleapis.com/etcd/demo/07_etcdctl_lease_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease grant &lt;span style="color:#0000cf;font-weight:bold">300&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># lease 2be7547fbc6a5afa granted with TTL(300s)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put sample value --lease&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get sample
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease keep-alive 2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease revoke 2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># or after 300 seconds&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get sample
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to create locks</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-create-locks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-create-locks/</guid><description>
&lt;p>&lt;code>lock&lt;/code> for distributed lock:&lt;/p>
&lt;p>&lt;img alt="08_etcdctl_lock_2016050501" src="https://storage.googleapis.com/etcd/demo/08_etcdctl_lock_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lock mutex1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># another client with the same name blocks&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lock mutex1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to create locks</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-create-locks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-create-locks/</guid><description>
&lt;p>&lt;code>lock&lt;/code> for distributed lock:&lt;/p>
&lt;p>&lt;img alt="08_etcdctl_lock_2016050501" src="https://storage.googleapis.com/etcd/demo/08_etcdctl_lock_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lock mutex1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># another client with the same name blocks&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lock mutex1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to conduct leader election in etcd cluster</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-conduct-elections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-conduct-elections/</guid><description>
&lt;p>&lt;code>elect&lt;/code> for leader election:&lt;/p>
&lt;p>&lt;img alt="09_etcdctl_elect_2016050501" src="https://storage.googleapis.com/etcd/demo/09_etcdctl_elect_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> elect one p1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># another client with the same name blocks&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> elect one p2
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to conduct leader election in etcd cluster</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-conduct-elections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-conduct-elections/</guid><description>
&lt;p>&lt;code>elect&lt;/code> for leader election:&lt;/p>
&lt;p>&lt;img alt="09_etcdctl_elect_2016050501" src="https://storage.googleapis.com/etcd/demo/09_etcdctl_elect_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> elect one p1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># another client with the same name blocks&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> elect one p2
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: Quickstart</title><link>https://etcd.io/docs/v3.4/quickstart/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/quickstart/</guid><description>
&lt;p>Follow these instructions to locally install, run, and test a single-member
cluster of etcd:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Install etcd from pre-built binaries or from source. For details, see
&lt;a href="../install/">Install&lt;/a>.&lt;/p>
&lt;div class="alert alert-warning" role="alert">
&lt;strong>Important&lt;/strong>: Ensure that you perform the last
step of the installation instructions to verify that &lt;code>etcd&lt;/code> is in your path.
&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Launch &lt;code>etcd&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcd --logger&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>zap
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">{&amp;#34;level&amp;#34;:&amp;#34;info&amp;#34;,&amp;#34;ts&amp;#34;:&amp;#34;2021-09-20T08:19:31.340-0400&amp;#34;,&amp;#34;caller&amp;#34;:&amp;#34;etcdmain/etcd.go:110&amp;#34;,&amp;#34;msg&amp;#34;:... }
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">⋮
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;strong>Note&lt;/strong>: The output produced by &lt;code>etcd&lt;/code> are
&lt;a href="../op-guide/configuration/#logging-flags">logs&lt;/a> — info-level logs can
be ignored.
&lt;/div>
&lt;/li>
&lt;li>
&lt;p>From &lt;strong>another terminal&lt;/strong>, use &lt;code>etcdctl&lt;/code> to set a key:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcdctl put greeting &lt;span style="color:#4e9a06">&amp;#34;Hello, etcd&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">OK
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>From the same terminal, retrieve the key:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcdctl get greeting
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">greeting
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">Hello, etcd
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="whats-next">What&amp;rsquo;s next?&lt;/h2>
&lt;p>Learn about more ways to configure and use etcd from the following pages:&lt;/p>
&lt;ul>
&lt;li>Explore the gRPC &lt;a href="https://etcd.io/docs/v3.4/learning/api">API&lt;/a>.&lt;/li>
&lt;li>Set up a &lt;a href="https://etcd.io/docs/v3.4/op-guide/clustering">multi-machine cluster&lt;/a>.&lt;/li>
&lt;li>Learn how to &lt;a href="https://etcd.io/docs/v3.4/op-guide/configuration">configure&lt;/a> etcd.&lt;/li>
&lt;li>Find &lt;a href="https://etcd.io/docs/v3.4/integrations">language bindings and tools&lt;/a>.&lt;/li>
&lt;li>Use TLS to &lt;a href="https://etcd.io/docs/v3.4/op-guide/security">secure an etcd cluster&lt;/a>.&lt;/li>
&lt;li>&lt;a href="https://etcd.io/docs/v3.4/tuning">Tune etcd&lt;/a>.&lt;/li>
&lt;/ul></description></item><item><title>Docs: Quickstart</title><link>https://etcd.io/docs/v3.5/quickstart/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/quickstart/</guid><description>
&lt;p>Follow these instructions to locally install, run, and test a single-member
cluster of etcd:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Install etcd from pre-built binaries or from source. For details, see
&lt;a href="../install/">Install&lt;/a>.&lt;/p>
&lt;div class="alert alert-warning" role="alert">
&lt;strong>Important&lt;/strong>: Ensure that you perform the last
step of the installation instructions to verify that &lt;code>etcd&lt;/code> is in your path.
&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Launch &lt;code>etcd&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcd
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">{&amp;#34;level&amp;#34;:&amp;#34;info&amp;#34;,&amp;#34;ts&amp;#34;:&amp;#34;2021-09-17T09:19:32.783-0400&amp;#34;,&amp;#34;caller&amp;#34;:&amp;#34;etcdmain/etcd.go:72&amp;#34;,&amp;#34;msg&amp;#34;:... }
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">⋮
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;strong>Note&lt;/strong>: The output produced by &lt;code>etcd&lt;/code> are
&lt;a href="../op-guide/configuration/#logging">logs&lt;/a> — info-level logs can
be ignored.
&lt;/div>
&lt;/li>
&lt;li>
&lt;p>From &lt;strong>another terminal&lt;/strong>, use &lt;code>etcdctl&lt;/code> to set a key:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcdctl put greeting &lt;span style="color:#4e9a06">&amp;#34;Hello, etcd&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">OK
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>From the same terminal, retrieve the key:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcdctl get greeting
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">greeting
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">Hello, etcd
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="whats-next">What&amp;rsquo;s next?&lt;/h2>
&lt;p>Learn about more ways to configure and use etcd from the following pages:&lt;/p>
&lt;ul>
&lt;li>Explore the gRPC &lt;a href="https://etcd.io/docs/v3.5/learning/api">API&lt;/a>.&lt;/li>
&lt;li>Set up a &lt;a href="https://etcd.io/docs/v3.5/op-guide/clustering">multi-machine cluster&lt;/a>.&lt;/li>
&lt;li>Learn how to &lt;a href="https://etcd.io/docs/v3.5/op-guide/configuration">configure&lt;/a> etcd.&lt;/li>
&lt;li>Find &lt;a href="https://etcd.io/docs/v3.5/integrations">language bindings and tools&lt;/a>.&lt;/li>
&lt;li>Use TLS to &lt;a href="https://etcd.io/docs/v3.5/op-guide/security">secure an etcd cluster&lt;/a>.&lt;/li>
&lt;li>&lt;a href="https://etcd.io/docs/v3.5/tuning">Tune etcd&lt;/a>.&lt;/li>
&lt;/ul></description></item><item><title>Docs: Quickstart</title><link>https://etcd.io/docs/v3.6/quickstart/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/quickstart/</guid><description>
&lt;p>Follow these instructions to locally install, run, and test a single-member
cluster of etcd:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Install etcd from pre-built binaries or from source. For details, see
&lt;a href="../install/">Install&lt;/a>.&lt;/p>
&lt;div class="alert alert-warning" role="alert">
&lt;strong>Important&lt;/strong>: Ensure that you perform the last
step of the installation instructions to verify that &lt;code>etcd&lt;/code> is in your path.
&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Launch &lt;code>etcd&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcd
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">{&amp;#34;level&amp;#34;:&amp;#34;info&amp;#34;,&amp;#34;ts&amp;#34;:&amp;#34;2021-09-17T09:19:32.783-0400&amp;#34;,&amp;#34;caller&amp;#34;:&amp;#34;etcdmain/etcd.go:72&amp;#34;,&amp;#34;msg&amp;#34;:... }
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">⋮
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;strong>Note&lt;/strong>: The output produced by &lt;code>etcd&lt;/code> are
&lt;a href="../op-guide/configuration/#logging">logs&lt;/a> — info-level logs can
be ignored.
&lt;/div>
&lt;/li>
&lt;li>
&lt;p>From &lt;strong>another terminal&lt;/strong>, use &lt;code>etcdctl&lt;/code> to set a key:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcdctl put greeting &lt;span style="color:#4e9a06">&amp;#34;Hello, etcd&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">OK
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>From the same terminal, retrieve the key:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902">$&lt;/span> etcdctl get greeting
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">greeting
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-style:italic">Hello, etcd
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="whats-next">What&amp;rsquo;s next?&lt;/h2>
&lt;p>Learn about more ways to configure and use etcd from the following pages:&lt;/p>
&lt;ul>
&lt;li>Explore the gRPC &lt;a href="https://etcd.io/docs/v3.6/learning/api">API&lt;/a>.&lt;/li>
&lt;li>Set up a &lt;a href="https://etcd.io/docs/v3.6/op-guide/clustering">multi-machine cluster&lt;/a>.&lt;/li>
&lt;li>Learn how to &lt;a href="https://etcd.io/docs/v3.6/op-guide/configuration">configure&lt;/a> etcd.&lt;/li>
&lt;li>Find &lt;a href="https://etcd.io/docs/v3.6/integrations">language bindings and tools&lt;/a>.&lt;/li>
&lt;li>Use TLS to &lt;a href="https://etcd.io/docs/v3.6/op-guide/security">secure an etcd cluster&lt;/a>.&lt;/li>
&lt;li>&lt;a href="https://etcd.io/docs/v3.6/tuning">Tune etcd&lt;/a>.&lt;/li>
&lt;/ul></description></item><item><title>Docs: How to check Cluster status</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-check-cluster-status/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-check-cluster-status/</guid><description>
&lt;p>Specify the initial cluster configuration for each machine:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>table --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> endpoint status
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> ENDPOINT &lt;span style="color:#000;font-weight:bold">|&lt;/span> ID &lt;span style="color:#000;font-weight:bold">|&lt;/span> VERSION &lt;span style="color:#000;font-weight:bold">|&lt;/span> DB SIZE &lt;span style="color:#000;font-weight:bold">|&lt;/span> IS LEADER &lt;span style="color:#000;font-weight:bold">|&lt;/span> IS LEARNER &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT TERM &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT INDEX &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT APPLIED INDEX &lt;span style="color:#000;font-weight:bold">|&lt;/span> ERRORS &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.17:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 4917a7ab173fabe7 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.5.0 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">true&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.18:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 59796ba9cd1bcd72 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.5.0 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.19:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 94df724b66343e6c &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.5.0 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------&lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> endpoint health
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.17:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 3.345431ms
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.19:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 3.767967ms
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.18:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 4.025451ms
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to check Cluster status</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-check-cluster-status/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-check-cluster-status/</guid><description>
&lt;p>Specify the initial cluster configuration for each machine:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>table --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> endpoint status
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> ENDPOINT &lt;span style="color:#000;font-weight:bold">|&lt;/span> ID &lt;span style="color:#000;font-weight:bold">|&lt;/span> VERSION &lt;span style="color:#000;font-weight:bold">|&lt;/span> DB SIZE &lt;span style="color:#000;font-weight:bold">|&lt;/span> IS LEADER &lt;span style="color:#000;font-weight:bold">|&lt;/span> IS LEARNER &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT TERM &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT INDEX &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT APPLIED INDEX &lt;span style="color:#000;font-weight:bold">|&lt;/span> ERRORS &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.17:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 4917a7ab173fabe7 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.5.0 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">true&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.18:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 59796ba9cd1bcd72 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.5.0 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.19:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 94df724b66343e6c &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.5.0 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------&lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> endpoint health
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.17:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 3.345431ms
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.19:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 3.767967ms
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.18:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 4.025451ms
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: Overview</title><link>https://etcd.io/docs/v3.4/rfc/v3api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/rfc/v3api/</guid><description>
&lt;p>The etcd v3 API is designed to give users a more efficient and cleaner abstraction compared to etcd v2. There are a number of semantic and protocol changes in this new API.&lt;/p>
&lt;p>To prove out the design of the v3 API the team has also built &lt;a href="https://github.com/etcd-io/etcd/tree/v3.4.30/contrib/recipes" target="_blank" rel="noopener">a number of example recipes&lt;/a>, there is a &lt;a href="https://www.youtube.com/watch?v=fj-2RY-3yVU&amp;amp;feature=youtu.be&amp;amp;t=590" target="_blank" rel="noopener">video discussing these recipes too&lt;/a>.&lt;/p>
&lt;h2 id="design">Design&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>Flatten binary key-value space&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Keep the event history until compaction&lt;/p>
&lt;ul>
&lt;li>access to old version of keys&lt;/li>
&lt;li>user controlled history compaction&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Support range query&lt;/p>
&lt;ul>
&lt;li>Pagination support with limit argument&lt;/li>
&lt;li>Support consistency guarantee across multiple range queries&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Replace TTL key with Lease&lt;/p>
&lt;ul>
&lt;li>more efficient/ low cost keep alive&lt;/li>
&lt;li>a logical group of TTL keys&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Replace CAS/CAD with multi-object Txn&lt;/p>
&lt;ul>
&lt;li>MUCH MORE powerful and flexible&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Support efficient watching with multiple ranges&lt;/p>
&lt;/li>
&lt;li>
&lt;p>RPC API supports the completed set of APIs.&lt;/p>
&lt;ul>
&lt;li>more efficient than JSON/HTTP&lt;/li>
&lt;li>additional txn/lease support&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>HTTP API supports a subset of APIs.&lt;/p>
&lt;ul>
&lt;li>easy for people to try out etcd&lt;/li>
&lt;li>easy for people to write simple etcd application&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;h3 id="request-size-limitation">Request Size Limitation&lt;/h3>
&lt;p>The max request size is around 1MB. Since etcd replicates requests in a streaming fashion, a very large
request might block other requests for a long time. The use case for etcd is to store small configuration
values, so we prevent user from submitting large requests. This also applies to Txn requests. We might loosen
the size in the future a little bit or make it configurable.&lt;/p>
&lt;h2 id="protobuf-defined-api">Protobuf Defined API&lt;/h2>
&lt;p>&lt;a href="https://github.com/etcd-io/etcd/blob/v3.4.30/etcdserver/etcdserverpb/rpc.proto" target="_blank" rel="noopener">api protobuf&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://github.com/etcd-io/etcd/blob/v3.4.30/mvcc/mvccpb/kv.proto" target="_blank" rel="noopener">kv protobuf&lt;/a>&lt;/p>
&lt;h2 id="examples">Examples&lt;/h2>
&lt;h3 id="put-a-key-foobar">Put a key (foo=bar)&lt;/h3>
&lt;pre tabindex="0">&lt;code>// A put is always successful
Put( PutRequest { key = foo, value = bar } )
PutResponse {
cluster_id = 0x1000,
member_id = 0x1,
revision = 1,
raft_term = 0x1,
}
&lt;/code>&lt;/pre>&lt;h3 id="get-a-key-assume-we-have-foobar">Get a key (assume we have foo=bar)&lt;/h3>
&lt;pre tabindex="0">&lt;code>Get ( RangeRequest { key = foo } )
RangeResponse {
cluster_id = 0x1000,
member_id = 0x1,
revision = 1,
raft_term = 0x1,
kvs = {
{
key = foo,
value = bar,
create_revision = 1,
mod_revision = 1,
version = 1;
},
},
}
&lt;/code>&lt;/pre>&lt;h3 id="range-over-a-key-space-assume-we-have-foo0bar0-foo100bar100">Range over a key space (assume we have foo0=bar0… foo100=bar100)&lt;/h3>
&lt;pre tabindex="0">&lt;code>Range ( RangeRequest { key = foo, end_key = foo80, limit = 30 } )
RangeResponse {
cluster_id = 0x1000,
member_id = 0x1,
revision = 100,
raft_term = 0x1,
kvs = {
{
key = foo0,
value = bar0,
create_revision = 1,
mod_revision = 1,
version = 1;
},
...,
{
key = foo30,
value = bar30,
create_revision = 30,
mod_revision = 30,
version = 1;
},
},
}
&lt;/code>&lt;/pre>&lt;h3 id="finish-a-txn-assume-we-have-foo0bar0-foo1bar1">Finish a txn (assume we have foo0=bar0, foo1=bar1)&lt;/h3>
&lt;pre tabindex="0">&lt;code>Txn(TxnRequest {
// mod_revision of foo0 is equal to 1, mod_revision of foo1 is greater than 1
compare = {
{compareType = equal, key = foo0, mod_revision = 1},
{compareType = greater, key = foo1, mod_revision = 1}}
},
// if the comparison succeeds, put foo2 = bar2
success = {PutRequest { key = foo2, value = success }},
// if the comparison fails, put foo2=fail
failure = {PutRequest { key = foo2, value = failure }},
)
TxnResponse {
cluster_id = 0x1000,
member_id = 0x1,
revision = 3,
raft_term = 0x1,
succeeded = true,
responses = {
// response of PUT foo2=success
{
cluster_id = 0x1000,
member_id = 0x1,
revision = 3,
raft_term = 0x1,
}
}
}
&lt;/code>&lt;/pre>&lt;h3 id="watch-on-a-keyrange">Watch on a key/range&lt;/h3>
&lt;pre tabindex="0">&lt;code>Watch( WatchRequest{
key = foo,
end_key = fop, // prefix foo
start_revision = 20,
end_revision = 10000,
// server decided notification frequency
progress_notification = true,
}
… // this can be a watch request stream
)
// put (foo0=bar0) event at 3
WatchResponse {
cluster_id = 0x1000,
member_id = 0x1,
revision = 3,
raft_term = 0x1,
event_type = put,
kv = {
key = foo0,
value = bar0,
create_revision = 1,
mod_revision = 1,
version = 1;
},
}
…
// a notification at 2000
WatchResponse {
cluster_id = 0x1000,
member_id = 0x1,
revision = 2000,
raft_term = 0x1,
// nil event as notification
}
…
// put (foo0=bar3000) event at 3000
WatchResponse {
cluster_id = 0x1000,
member_id = 0x1,
revision = 3000,
raft_term = 0x1,
event_type = put,
kv = {
key = foo0,
value = bar3000,
create_revision = 1,
mod_revision = 3000,
version = 2;
},
}
…
&lt;/code>&lt;/pre></description></item><item><title>Docs: Demo</title><link>https://etcd.io/docs/v3.4/demo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/demo/</guid><description>
&lt;p>This series of examples shows the basic procedures for working with an etcd cluster.&lt;/p>
&lt;h2 id="set-up-a-cluster">Set up a cluster&lt;/h2>
&lt;p>&lt;img alt="01_etcd_clustering_2016050601" src="https://storage.googleapis.com/etcd/demo/01_etcd_clustering_2016051001.gif">&lt;/p>
&lt;p>On each etcd node, specify the cluster members:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>token-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Run this on each machine:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For machine 3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Or use our public discovery service:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl &lt;span style="color:#4e9a06">&amp;#39;https://discovery.etcd.io/new?size=3&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># grab this token&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>token-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>machine-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --discovery &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">DISCOVERY&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now etcd is ready! To connect to etcd with etcdctl:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.17
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.18
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.19
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$HOST_1&lt;/span>:2379,&lt;span style="color:#000">$HOST_2&lt;/span>:2379,&lt;span style="color:#000">$HOST_3&lt;/span>:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> member list
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="access-etcd">Access etcd&lt;/h2>
&lt;p>&lt;img alt="02_etcdctl_access_etcd_2016051001" src="https://storage.googleapis.com/etcd/demo/02_etcdctl_access_etcd_2016051001.gif">&lt;/p>
&lt;p>&lt;code>put&lt;/code> command to write:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put foo &lt;span style="color:#4e9a06">&amp;#34;Hello World!&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>get&lt;/code> to read from etcd:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;json&amp;#34;&lt;/span> get foo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="get-by-prefix">Get by prefix&lt;/h2>
&lt;p>&lt;img alt="03_etcdctl_get_by_prefix_2016050501" src="https://storage.googleapis.com/etcd/demo/03_etcdctl_get_by_prefix_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web1 value1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web2 value2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put web3 value3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get web --prefix
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="delete">Delete&lt;/h2>
&lt;p>&lt;img alt="04_etcdctl_delete_2016050601" src="https://storage.googleapis.com/etcd/demo/04_etcdctl_delete_2016050601.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put key myvalue
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> del key
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put k1 value1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put k2 value2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> del k --prefix
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="transactional-write">Transactional write&lt;/h2>
&lt;p>&lt;code>txn&lt;/code> to wrap multiple requests into one transaction:&lt;/p>
&lt;p>&lt;img alt="05_etcdctl_transaction_2016050501" src="https://storage.googleapis.com/etcd/demo/05_etcdctl_transaction_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put user1 bad
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> txn --interactive
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>compares:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>value&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;user1&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;bad&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>success requests &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>get, put, delete&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>del user1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>failure requests &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>get, put, delete&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>put user1 good
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="watch">Watch&lt;/h2>
&lt;p>&lt;code>watch&lt;/code> to get notified of future changes:&lt;/p>
&lt;p>&lt;img alt="06_etcdctl_watch_2016050501" src="https://storage.googleapis.com/etcd/demo/06_etcdctl_watch_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> watch stock1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock1 &lt;span style="color:#0000cf;font-weight:bold">1000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> watch stock --prefix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock1 &lt;span style="color:#0000cf;font-weight:bold">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put stock2 &lt;span style="color:#0000cf;font-weight:bold">20&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="lease">Lease&lt;/h2>
&lt;p>&lt;code>lease&lt;/code> to write with TTL:&lt;/p>
&lt;p>&lt;img alt="07_etcdctl_lease_2016050501" src="https://storage.googleapis.com/etcd/demo/07_etcdctl_lease_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease grant &lt;span style="color:#0000cf;font-weight:bold">300&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># lease 2be7547fbc6a5afa granted with TTL(300s)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> put sample value --lease&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get sample
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease keep-alive 2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lease revoke 2be7547fbc6a5afa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># or after 300 seconds&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get sample
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="distributed-locks">Distributed locks&lt;/h2>
&lt;p>&lt;code>lock&lt;/code> for distributed lock:&lt;/p>
&lt;p>&lt;img alt="08_etcdctl_lock_2016050501" src="https://storage.googleapis.com/etcd/demo/08_etcdctl_lock_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lock mutex1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># another client with the same name blocks&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> lock mutex1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="elections">Elections&lt;/h2>
&lt;p>&lt;code>elect&lt;/code> for leader election:&lt;/p>
&lt;p>&lt;img alt="09_etcdctl_elect_2016050501" src="https://storage.googleapis.com/etcd/demo/09_etcdctl_elect_2016050501.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> elect one p1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># another client with the same name blocks&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> elect one p2
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="cluster-status">Cluster status&lt;/h2>
&lt;p>Specify the initial cluster configuration for each machine:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>table --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> endpoint status
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> ENDPOINT &lt;span style="color:#000;font-weight:bold">|&lt;/span> ID &lt;span style="color:#000;font-weight:bold">|&lt;/span> VERSION &lt;span style="color:#000;font-weight:bold">|&lt;/span> DB SIZE &lt;span style="color:#000;font-weight:bold">|&lt;/span> IS LEADER &lt;span style="color:#000;font-weight:bold">|&lt;/span> IS LEARNER &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT TERM &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT INDEX &lt;span style="color:#000;font-weight:bold">|&lt;/span> RAFT APPLIED INDEX &lt;span style="color:#000;font-weight:bold">|&lt;/span> ERRORS &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.17:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 4917a7ab173fabe7 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.4.15 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">true&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.18:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 59796ba9cd1bcd72 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.4.15 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> 10.240.0.19:2379 &lt;span style="color:#000;font-weight:bold">|&lt;/span> 94df724b66343e6c &lt;span style="color:#000;font-weight:bold">|&lt;/span> 3.4.15 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">45&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#204a87">false&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">4&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16726&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------&lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> endpoint health
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.17:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 3.345431ms
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.19:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 3.767967ms
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>10.240.0.18:2379 is healthy: successfully committed proposal: &lt;span style="color:#000">took&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 4.025451ms
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="snapshot">Snapshot&lt;/h2>
&lt;p>&lt;code>snapshot&lt;/code> to save point-in-time snapshot of etcd database:&lt;/p>
&lt;p>&lt;img alt="11_etcdctl_snapshot_2016051001" src="https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif">&lt;/p>
&lt;p>Snapshot can only be requested from one etcd node, so &lt;code>--endpoints&lt;/code> flag should contain only one endpoint.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$HOST_1&lt;/span>:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> snapshot save my.db
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Snapshot saved at my.db
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdctl --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>table --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> snapshot status my.db
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> HASH &lt;span style="color:#000;font-weight:bold">|&lt;/span> REVISION &lt;span style="color:#000;font-weight:bold">|&lt;/span> TOTAL KEYS &lt;span style="color:#000;font-weight:bold">|&lt;/span> TOTAL SIZE &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> c55e8b8 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">9&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">13&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">25&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="migrate">Migrate&lt;/h2>
&lt;p>&lt;code>migrate&lt;/code> to transform etcd v2 to v3 data:&lt;/p>
&lt;p>&lt;img alt="12_etcdctl_migrate_2016061602" src="https://storage.googleapis.com/etcd/demo/12_etcdctl_migrate_2016061602.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># write key in etcd version 2 store&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#000">$ENDPOINT&lt;/span> &lt;span style="color:#204a87">set&lt;/span> foo bar
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># read key in etcd v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> --output&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;json&amp;#34;&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># stop etcd node to migrate, one by one&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># migrate v2 data&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINT&lt;/span> migrate --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;default.etcd&amp;#34;&lt;/span> --wal-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;default.etcd/member/wal&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># restart etcd node after migrate, one by one&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># confirm that the key got migrated&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get /foo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="member">Member&lt;/h2>
&lt;p>&lt;code>member&lt;/code> to add,remove,update membership:&lt;/p>
&lt;p>&lt;img alt="13_etcdctl_member_2016062301" src="https://storage.googleapis.com/etcd/demo/13_etcdctl_member_2016062301.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For each machine&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>my-etcd-token-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.15
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then replace a member with &lt;code>member remove&lt;/code> and &lt;code>member add&lt;/code> commands:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># get member ID&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.15
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 member list
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># remove the member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">MEMBER_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>278c654c9a6dfd3b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> member remove &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">MEMBER_ID&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># add a new member (node 4)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.16 &lt;span style="color:#8f5902;font-style:italic"># new member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> member add &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --peer-urls&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, start the new member with &lt;code>--initial-cluster-state existing&lt;/code> flag:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># [WARNING] If the new member starts from the same disk space,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># make sure to remove the data directory of the old member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">#&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># restart with &amp;#39;existing&amp;#39; flag&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>my-etcd-token-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>existing
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.16 &lt;span style="color:#8f5902;font-style:italic"># new member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="auth">Auth&lt;/h2>
&lt;p>&lt;code>auth&lt;/code>,&lt;code>user&lt;/code>,&lt;code>role&lt;/code> for authentication:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>localhost:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role add root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role get root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user add root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user grant-role root root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user get root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role add role0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role grant-permission role0 readwrite foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user add user0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user grant-role user0 role0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> auth &lt;span style="color:#204a87">enable&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># now all client requests go through auth&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 put foo bar
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># permission denied, user name is empty because the request does not issue an authentication request&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># user0 can read the key foo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 get foo1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: Demo</title><link>https://etcd.io/docs/v3.5/demo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/demo/</guid><description>
&lt;p>This series of examples shows the basic procedures for working with an etcd cluster.&lt;/p>
&lt;h2 id="auth">Auth&lt;/h2>
&lt;p>&lt;code>auth&lt;/code>,&lt;code>user&lt;/code>,&lt;code>role&lt;/code> for authentication:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>localhost:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role add root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role get root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user add root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user grant-role root root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user get root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role add role0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role grant-permission role0 readwrite foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user add user0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user grant-role user0 role0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> auth &lt;span style="color:#204a87">enable&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># now all client requests go through auth&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 put foo bar
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># permission denied, user name is empty because the request does not issue an authentication request&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># user0 can read the key foo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 get foo1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: Demo</title><link>https://etcd.io/docs/v3.6/demo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/demo/</guid><description>
&lt;p>This series of examples shows the basic procedures for working with an etcd cluster.&lt;/p>
&lt;h2 id="auth">Auth&lt;/h2>
&lt;p>&lt;code>auth&lt;/code>,&lt;code>user&lt;/code>,&lt;code>role&lt;/code> for authentication:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>localhost:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role add root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role get root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user add root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user grant-role root root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user get root
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role add role0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> role grant-permission role0 readwrite foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user add user0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> user grant-role user0 role0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> auth &lt;span style="color:#204a87">enable&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># now all client requests go through auth&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 put foo bar
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># permission denied, user name is empty because the request does not issue an authentication request&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># user0 can read the key foo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> --user&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>user0:123 get foo1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to save the database</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-save-database/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-save-database/</guid><description>
&lt;p>&lt;code>snapshot&lt;/code> to save point-in-time snapshot of etcd database:&lt;/p>
&lt;p>&lt;img alt="11_etcdctl_snapshot_2016051001" src="https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif">&lt;/p>
&lt;p>Snapshot can only be requested from one etcd node, so &lt;code>--endpoints&lt;/code> flag should contain only one endpoint.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$HOST_1&lt;/span>:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> snapshot save my.db
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Snapshot saved at my.db
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdutl --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>table snapshot status my.db
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> HASH &lt;span style="color:#000;font-weight:bold">|&lt;/span> REVISION &lt;span style="color:#000;font-weight:bold">|&lt;/span> TOTAL KEYS &lt;span style="color:#000;font-weight:bold">|&lt;/span> TOTAL SIZE &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> c55e8b8 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">9&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">13&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">25&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to save the database</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-save-database/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-save-database/</guid><description>
&lt;p>&lt;code>snapshot&lt;/code> to save point-in-time snapshot of etcd database:&lt;/p>
&lt;p>&lt;img alt="11_etcdctl_snapshot_2016051001" src="https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif">&lt;/p>
&lt;p>Snapshot can only be requested from one etcd node, so &lt;code>--endpoints&lt;/code> flag should contain only one endpoint.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ENDPOINTS&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$HOST_1&lt;/span>:2379
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> snapshot save my.db
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Snapshot saved at my.db
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etcdutl --write-out&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>table snapshot status my.db
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> HASH &lt;span style="color:#000;font-weight:bold">|&lt;/span> REVISION &lt;span style="color:#000;font-weight:bold">|&lt;/span> TOTAL KEYS &lt;span style="color:#000;font-weight:bold">|&lt;/span> TOTAL SIZE &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">|&lt;/span> c55e8b8 &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">9&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">13&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">25&lt;/span> kB &lt;span style="color:#000;font-weight:bold">|&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+---------+----------+------------+------------+
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: Install</title><link>https://etcd.io/docs/v3.4/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/install/</guid><description>
&lt;h2 id="requirements">Requirements&lt;/h2>
&lt;p>Before installing etcd, see the following pages:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://etcd.io/docs/v3.4/op-guide/supported-platform/">Supported platforms&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://etcd.io/docs/v3.4/op-guide/hardware/">Hardware recommendations&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="install-pre-built-binaries">Install pre-built binaries&lt;/h2>
&lt;p>The easiest way to install etcd is from pre-built binaries:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Download the compressed archive file for your platform from &lt;a href="https://github.com/etcd-io/etcd/releases/" target="_blank" rel="noopener">Releases&lt;/a>,
choosing release &lt;a href="https://github.com/etcd-io/etcd/releases/tag/v3.4.30" target="_blank" rel="noopener">v3.4.30&lt;/a> or later.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Unpack the archive file. This results in a directory containing the binaries.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the executable binaries to your path. For example, rename and/or move
the binaries to a directory in your path (like &lt;code>/usr/local/bin&lt;/code>), or add the
directory created by the previous step to your path.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>From a shell, test that &lt;code>etcd&lt;/code> is in your path:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd Version: 3.4.30
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="build-from-source">Build from source&lt;/h2>
&lt;p>If you have &lt;a href="https://golang.org/doc/install" target="_blank" rel="noopener">Go version 1.2+&lt;/a>, you can build etcd from
source by following these steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;a href="https://github.com/etcd-io/etcd/archive/v3.4.30.zip" target="_blank" rel="noopener">Download the etcd repo as a zip file&lt;/a> and unzip it, or clone the
repo using the following command.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ git clone -b v3.4.30 https://github.com/etcd-io/etcd.git
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To build from &lt;code>main@HEAD&lt;/code>, omit the &lt;code>-b v3.4.30&lt;/code> flag.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Change directory:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">cd&lt;/span> etcd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run the build script:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ ./build
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The binaries are under the &lt;code>bin&lt;/code> directory.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the full path to the &lt;code>bin&lt;/code> directory to your path, for example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">PATH&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$PATH&lt;/span>&lt;span style="color:#4e9a06">:`pwd`/bin&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Test that &lt;code>etcd&lt;/code> is in your path:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="installation-check">Installation check&lt;/h2>
&lt;p>For a slightly more involved sanity check of your installation, see
&lt;a href="https://etcd.io/docs/v3.4/quickstart/">Quickstart&lt;/a>.&lt;/p></description></item><item><title>Docs: Install</title><link>https://etcd.io/docs/v3.5/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/install/</guid><description>
&lt;h2 id="requirements">Requirements&lt;/h2>
&lt;p>Before installing etcd, see the following pages:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://etcd.io/docs/v3.5/op-guide/supported-platform/">Supported platforms&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://etcd.io/docs/v3.5/op-guide/hardware/">Hardware recommendations&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="install-pre-built-binaries">Install pre-built binaries&lt;/h2>
&lt;p>The easiest way to install etcd is from pre-built binaries:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Download the compressed archive file for your platform from &lt;a href="https://github.com/etcd-io/etcd/releases/" target="_blank" rel="noopener">Releases&lt;/a>,
choosing release &lt;a href="https://github.com/etcd-io/etcd/releases/tag/v3.5.12" target="_blank" rel="noopener">v3.5.12&lt;/a> or later.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Unpack the archive file. This results in a directory containing the binaries.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the executable binaries to your path. For example, rename and/or move
the binaries to a directory in your path (like &lt;code>/usr/local/bin&lt;/code>), or add the
directory created by the previous step to your path.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>From a shell, test that &lt;code>etcd&lt;/code> is in your path:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd Version: 3.5.12
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="build-from-source">Build from source&lt;/h2>
&lt;p>If you have &lt;a href="https://golang.org/doc/install" target="_blank" rel="noopener">Go version 1.2+&lt;/a>, you can build etcd from
source by following these steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;a href="https://github.com/etcd-io/etcd/archive/v3.5.12.zip" target="_blank" rel="noopener">Download the etcd repo as a zip file&lt;/a> and unzip it, or clone the
repo using the following command.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ git clone -b v3.5.12 https://github.com/etcd-io/etcd.git
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To build from &lt;code>main@HEAD&lt;/code>, omit the &lt;code>-b v3.5.12&lt;/code> flag.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Change directory:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">cd&lt;/span> etcd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run the build script:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ ./build.sh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The binaries are under the &lt;code>bin&lt;/code> directory.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the full path to the &lt;code>bin&lt;/code> directory to your path, for example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">PATH&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$PATH&lt;/span>&lt;span style="color:#4e9a06">:`pwd`/bin&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Test that &lt;code>etcd&lt;/code> is in your path:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="installation-via-os-packages">Installation via OS packages&lt;/h2>
&lt;p>&lt;em>Disclaimer: etcd installations through OS package managers can deliver outdated versions since they are not being automatically maintained nor officially supported by etcd project. Therefore use OS packages with caution.&lt;/em>&lt;/p>
&lt;p>There are various ways of installing etcd on different operating systems and these are just some examples how it can be done.&lt;/p>
&lt;h3 id="macos-homebrew">MacOS (Homebrew)&lt;/h3>
&lt;ol>
&lt;li>Update homebrew:&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ brew update
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="2">
&lt;li>Install etcd:&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ brew install etcd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="3">
&lt;li>Verify install&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="linux">Linux&lt;/h2>
&lt;p>TBD&lt;/p>
&lt;h2 id="installation-as-part-of-kubernetes-installation">Installation as part of Kubernetes installation&lt;/h2>
&lt;p>TBD&amp;mdash;Help Wanted&lt;/p>
&lt;h2 id="installation-on-kubernetes-using-a-statefulset-or-helm-chart">Installation on Kubernetes, using a statefulset or helm chart&lt;/h2>
&lt;p>The etcd project does not currently maintain a helm chart, however you can follow the instructions provided by &lt;a href="https://bitnami.com/stack/etcd/helm" target="_blank" rel="noopener">Bitnami&amp;rsquo;s etcd Helm chart&lt;/a>.&lt;/p>
&lt;h2 id="installation-check">Installation check&lt;/h2>
&lt;p>For a slightly more involved sanity check of your installation, see
&lt;a href="https://etcd.io/docs/v3.5/quickstart/">Quickstart&lt;/a>.&lt;/p></description></item><item><title>Docs: Install</title><link>https://etcd.io/docs/v3.6/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/install/</guid><description>
&lt;h2 id="requirements">Requirements&lt;/h2>
&lt;p>Before installing etcd, see the following pages:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://etcd.io/docs/v3.6/op-guide/supported-platform/">Supported platforms&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://etcd.io/docs/v3.6/op-guide/hardware/">Hardware recommendations&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="install-pre-built-binaries">Install pre-built binaries&lt;/h2>
&lt;p>The easiest way to install etcd is from pre-built binaries:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Download the compressed archive file for your platform from &lt;a href="https://github.com/etcd-io/etcd/releases/" target="_blank" rel="noopener">Releases&lt;/a>,
choosing release &lt;a href="https://github.com/etcd-io/etcd/releases/tag/v3.6.0-alpha.0" target="_blank" rel="noopener">v3.6.0-alpha.0&lt;/a> or later.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Unpack the archive file. This results in a directory containing the binaries.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the executable binaries to your path. For example, rename and/or move
the binaries to a directory in your path (like &lt;code>/usr/local/bin&lt;/code>), or add the
directory created by the previous step to your path.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>From a shell, test that &lt;code>etcd&lt;/code> is in your path:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd Version: 3.6.0-alpha.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="build-from-source">Build from source&lt;/h2>
&lt;p>If you have &lt;a href="https://golang.org/doc/install" target="_blank" rel="noopener">Go version 1.21+&lt;/a>, you can build etcd from
source by following these steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;a href="https://github.com/etcd-io/etcd/archive/v3.6.0-alpha.0.zip" target="_blank" rel="noopener">Download the etcd repo as a zip file&lt;/a> and unzip it, or clone the
repo using the following command.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ git clone -b v3.6.0-alpha.0 https://github.com/etcd-io/etcd.git
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To build from &lt;code>main@HEAD&lt;/code>, omit the &lt;code>-b v3.6.0-alpha.0&lt;/code> flag.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Change directory:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">cd&lt;/span> etcd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run the build script:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ ./scripts/build.sh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The binaries are under the &lt;code>bin&lt;/code> directory.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the full path to the &lt;code>bin&lt;/code> directory to your path, for example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">PATH&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$PATH&lt;/span>&lt;span style="color:#4e9a06">:`pwd`/bin&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Test that &lt;code>etcd&lt;/code> is in your path:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="installation-via-os-packages">Installation via OS packages&lt;/h2>
&lt;p>&lt;em>Disclaimer: etcd installations through OS package managers can deliver outdated versions since they are not being automatically maintained nor officially supported by etcd project. Therefore use OS packages with caution.&lt;/em>&lt;/p>
&lt;p>There are various ways of installing etcd on different operating systems and these are just some examples how it can be done.&lt;/p>
&lt;h3 id="macos-homebrew">MacOS (Homebrew)&lt;/h3>
&lt;ol>
&lt;li>Update homebrew:&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ brew update
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="2">
&lt;li>Install etcd:&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ brew install etcd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="3">
&lt;li>Verify install&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="linux">Linux&lt;/h2>
&lt;p>TBD&lt;/p>
&lt;h2 id="installation-as-part-of-kubernetes-installation">Installation as part of Kubernetes installation&lt;/h2>
&lt;p>TBD&amp;mdash;Help Wanted&lt;/p>
&lt;h2 id="installation-on-kubernetes-using-a-statefulset-or-helm-chart">Installation on Kubernetes, using a statefulset or helm chart&lt;/h2>
&lt;p>The etcd project does not currently maintain a helm chart, however you can follow the instructions provided by &lt;a href="https://bitnami.com/stack/etcd/helm" target="_blank" rel="noopener">Bitnami&amp;rsquo;s etcd Helm chart&lt;/a>.&lt;/p>
&lt;h2 id="installation-check">Installation check&lt;/h2>
&lt;p>For a slightly more involved sanity check of your installation, see
&lt;a href="https://etcd.io/docs/v3.6/quickstart/">Quickstart&lt;/a>.&lt;/p></description></item><item><title>Docs: FAQ</title><link>https://etcd.io/docs/v3.4/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/faq/</guid><description>
&lt;h2 id="etcd-general">etcd, general&lt;/h2>
&lt;h3 id="do-clients-have-to-send-requests-to-the-etcd-leader">Do clients have to send requests to the etcd leader?&lt;/h3>
&lt;p>&lt;a href="https://raft.github.io/raft.pdf" target="_blank" rel="noopener">Raft&lt;/a> is leader-based; the leader handles all client requests which need cluster consensus. However, the client does not need to know which node is the leader. Any request that requires consensus sent to a follower is automatically forwarded to the leader. Requests that do not require consensus (e.g., serialized reads) can be processed by any cluster member.&lt;/p>
&lt;h2 id="configuration">Configuration&lt;/h2>
&lt;h3 id="what-is-the-difference-between-listen-clientpeer-urls-advertise-client-urls-or-initial-advertise-peer-urls">What is the difference between listen-&amp;lt;client,peer&amp;gt;-urls, advertise-client-urls or initial-advertise-peer-urls?&lt;/h3>
&lt;p>&lt;code>listen-client-urls&lt;/code> and &lt;code>listen-peer-urls&lt;/code> specify the local addresses etcd server binds to for accepting incoming connections. To listen on a port for all interfaces, specify &lt;code>0.0.0.0&lt;/code> as the listen IP address.&lt;/p>
&lt;p>&lt;code>advertise-client-urls&lt;/code> and &lt;code>initial-advertise-peer-urls&lt;/code> specify the addresses etcd clients or other etcd members should use to contact the etcd server. The advertise addresses must be reachable from the remote machines. Do not advertise addresses like &lt;code>localhost&lt;/code> or &lt;code>0.0.0.0&lt;/code> for a production setup since these addresses are unreachable from remote machines.&lt;/p>
&lt;h3 id="why-doesnt-changing---listen-peer-urls-or---initial-advertise-peer-urls-update-the-advertised-peer-urls-in-etcdctl-member-list">Why doesn&amp;rsquo;t changing &lt;code>--listen-peer-urls&lt;/code> or &lt;code>--initial-advertise-peer-urls&lt;/code> update the advertised peer URLs in &lt;code>etcdctl member list&lt;/code>?&lt;/h3>
&lt;p>A member&amp;rsquo;s advertised peer URLs come from &lt;code>--initial-advertise-peer-urls&lt;/code> on initial cluster boot. Changing the listen peer URLs or the initial advertise peers after booting the member won&amp;rsquo;t affect the exported advertise peer URLs since changes must go through quorum to avoid membership configuration split brain. Use &lt;code>etcdctl member update&lt;/code> to update a member&amp;rsquo;s peer URLs.&lt;/p>
&lt;h2 id="deployment">Deployment&lt;/h2>
&lt;h3 id="system-requirements">System requirements&lt;/h3>
&lt;p>Since etcd writes data to disk, its performance strongly depends on disk performance. For this reason, SSD is highly recommended. To assess whether a disk is fast enough for etcd, one possibility is using a disk benchmarking tool such as &lt;a href="https://github.com/axboe/fio" target="_blank" rel="noopener">fio&lt;/a>. For an example on how to do that, read &lt;a href="https://www.ibm.com/blogs/bluemix/2019/04/using-fio-to-tell-whether-your-storage-is-fast-enough-for-etcd/" target="_blank" rel="noopener">here&lt;/a>. To prevent performance degradation or unintentionally overloading the key-value store, etcd enforces a configurable storage size quota set to 2GB by default. To avoid swapping or running out of memory, the machine should have at least as much RAM to cover the quota. 8GB is a suggested maximum size for normal environments and etcd warns at startup if the configured value exceeds it. At CoreOS, an etcd cluster is usually deployed on dedicated CoreOS Container Linux machines with dual-core processors, 2GB of RAM, and 80GB of SSD &lt;em>at the very least&lt;/em>. &lt;strong>Note that performance is intrinsically workload dependent; please test before production deployment&lt;/strong>. See &lt;a href="../op-guide/hardware/">hardware&lt;/a> for more recommendations.&lt;/p>
&lt;p>Most stable production environment is Linux operating system with amd64 architecture; see &lt;a href="../op-guide/supported-platform/">supported platform&lt;/a> for more.&lt;/p>
&lt;h3 id="why-an-odd-number-of-cluster-members">Why an odd number of cluster members?&lt;/h3>
&lt;p>An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. For a cluster with n members, quorum is (n/2)+1. For any odd-sized cluster, adding one node will always increase the number of nodes necessary for quorum. Although adding a node to an odd-sized cluster appears better since there are more machines, the fault tolerance is worse since exactly the same number of nodes may fail without losing quorum but there are more nodes that can fail. If the cluster is in a state where it can&amp;rsquo;t tolerate any more failures, adding a node before removing nodes is dangerous because if the new node fails to register with the cluster (e.g., the address is misconfigured), quorum will be permanently lost.&lt;/p>
&lt;h3 id="what-is-maximum-cluster-size">What is maximum cluster size?&lt;/h3>
&lt;p>Theoretically, there is no hard limit. However, an etcd cluster probably should have no more than seven nodes. &lt;a href="http://static.googleusercontent.com/media/research.google.com/en//archive/chubby-osdi06.pdf" target="_blank" rel="noopener">Google Chubby lock service&lt;/a>, similar to etcd and widely deployed within Google for many years, suggests running five nodes. A 5-member etcd cluster can tolerate two member failures, which is enough in most cases. Although larger clusters provide better fault tolerance, the write performance suffers because data must be replicated across more machines.&lt;/p>
&lt;h3 id="what-is-failure-tolerance">What is failure tolerance?&lt;/h3>
&lt;p>An etcd cluster operates so long as a member quorum can be established. If quorum is lost through transient network failures (e.g., partitions), etcd automatically and safely resumes once the network recovers and restores quorum; Raft enforces cluster consistency. For power loss, etcd persists the Raft log to disk; etcd replays the log to the point of failure and resumes cluster participation. For permanent hardware failure, the node may be removed from the cluster through &lt;a href="https://etcd.io/docs/v3.4/op-guide/runtime-configuration/">runtime reconfiguration&lt;/a>.&lt;/p>
&lt;p>It is recommended to have an odd number of members in a cluster. An odd-size cluster tolerates the same number of failures as an even-size cluster but with fewer nodes. The difference can be seen by comparing even and odd sized clusters:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:center">Cluster Size&lt;/th>
&lt;th style="text-align:center">Majority&lt;/th>
&lt;th style="text-align:center">Failure Tolerance&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:center">1&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">6&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">7&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">8&lt;/td>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">9&lt;/td>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Adding a member to bring the size of cluster up to an even number doesn&amp;rsquo;t buy additional fault tolerance. Likewise, during a network partition, an odd number of members guarantees that there will always be a majority partition that can continue to operate and be the source of truth when the partition ends.&lt;/p>
&lt;h3 id="does-etcd-work-in-cross-region-or-cross-data-center-deployments">Does etcd work in cross-region or cross data center deployments?&lt;/h3>
&lt;p>Deploying etcd across regions improves etcd&amp;rsquo;s fault tolerance since members are in separate failure domains. The cost is higher consensus request latency from crossing data center boundaries. Since etcd relies on a member quorum for consensus, the latency from crossing data centers will be somewhat pronounced because at least a majority of cluster members must respond to consensus requests. Additionally, cluster data must be replicated across all peers, so there will be bandwidth cost as well.&lt;/p>
&lt;p>With longer latencies, the default etcd configuration may cause frequent elections or heartbeat timeouts. See &lt;a href="../tuning/">tuning&lt;/a> for adjusting timeouts for high latency deployments.&lt;/p>
&lt;h2 id="operation">Operation&lt;/h2>
&lt;h3 id="how-to-backup-a-etcd-cluster">How to backup a etcd cluster?&lt;/h3>
&lt;p>etcdctl provides a &lt;code>snapshot&lt;/code> command to create backups. See &lt;a href="https://etcd.io/docs/v3.4/op-guide/recovery#snapshotting-the-keyspace">backup&lt;/a> for more details.&lt;/p>
&lt;h3 id="should-i-add-a-member-before-removing-an-unhealthy-member">Should I add a member before removing an unhealthy member?&lt;/h3>
&lt;p>When replacing an etcd node, it&amp;rsquo;s important to remove the member first and then add its replacement.&lt;/p>
&lt;p>etcd employs distributed consensus based on a quorum model; (n/2)+1 members, a majority, must agree on a proposal before it can be committed to the cluster. These proposals include key-value updates and membership changes. This model totally avoids any possibility of split brain inconsistency. The consequence of permanent quorum loss is catastrophic.&lt;/p>
&lt;p>How this applies to membership: If a 3-member cluster has 1 downed member, it can still make forward progress because the quorum is 2 and 2 members are still live. However, adding a new member to a 3-member cluster will increase the quorum to 3 because 3 votes are required for a majority of 4 members. Since the quorum increased, this extra member buys nothing in terms of fault tolerance; the cluster is still one node failure away from being unrecoverable.&lt;/p>
&lt;p>Additionally, that new member is risky because it may turn out to be misconfigured or incapable of joining the cluster. In that case, there&amp;rsquo;s no way to recover quorum because the cluster has two members down and two members up, but needs three votes to change membership to undo the botched membership addition. etcd will by default reject member add attempts that could take down the cluster in this manner.&lt;/p>
&lt;p>On the other hand, if the downed member is removed from cluster membership first, the number of members becomes 2 and the quorum remains at 2. Following that removal by adding a new member will also keep the quorum steady at 2. So, even if the new node can&amp;rsquo;t be brought up, it&amp;rsquo;s still possible to remove the new member through quorum on the remaining live members.&lt;/p>
&lt;h3 id="why-wont-etcd-accept-my-membership-changes">Why won&amp;rsquo;t etcd accept my membership changes?&lt;/h3>
&lt;p>etcd sets &lt;code>strict-reconfig-check&lt;/code> in order to reject reconfiguration requests that would cause quorum loss. Abandoning quorum is really risky (especially when the cluster is already unhealthy). Although it may be tempting to disable quorum checking if there&amp;rsquo;s quorum loss to add a new member, this could lead to full fledged cluster inconsistency. For many applications, this will make the problem even worse (&amp;ldquo;disk geometry corruption&amp;rdquo; being a candidate for most terrifying).&lt;/p>
&lt;h3 id="why-does-etcd-lose-its-leader-from-disk-latency-spikes">Why does etcd lose its leader from disk latency spikes?&lt;/h3>
&lt;p>This is intentional; disk latency is part of leader liveness. Suppose the cluster leader takes a minute to fsync a raft log update to disk, but the etcd cluster has a one second election timeout. Even though the leader can process network messages within the election interval (e.g., send heartbeats), it&amp;rsquo;s effectively unavailable because it can&amp;rsquo;t commit any new proposals; it&amp;rsquo;s waiting on the slow disk. If the cluster frequently loses its leader due to disk latencies, try &lt;a href="../tuning/">tuning&lt;/a> the disk settings or etcd time parameters.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-request-ignored-cluster-id-mismatch-mean">What does the etcd warning &amp;ldquo;request ignored (cluster ID mismatch)&amp;rdquo; mean?&lt;/h3>
&lt;p>Every new etcd cluster generates a new cluster ID based on the initial cluster configuration and a user-provided unique &lt;code>initial-cluster-token&lt;/code> value. By having unique cluster ID&amp;rsquo;s, etcd is protected from cross-cluster interaction which could corrupt the cluster.&lt;/p>
&lt;p>Usually this warning happens after tearing down an old cluster, then reusing some of the peer addresses for the new cluster. If any etcd process from the old cluster is still running it will try to contact the new cluster. The new cluster will recognize a cluster ID mismatch, then ignore the request and emit this warning. This warning is often cleared by ensuring peer addresses among distinct clusters are disjoint.&lt;/p>
&lt;h3 id="what-does-mvcc-database-space-exceeded-mean-and-how-do-i-fix-it">What does &amp;ldquo;mvcc: database space exceeded&amp;rdquo; mean and how do I fix it?&lt;/h3>
&lt;p>The &lt;a href="../learning/api/#revisions">multi-version concurrency control&lt;/a> data model in etcd keeps an exact history of the keyspace. Without periodically compacting this history (e.g., by setting &lt;code>--auto-compaction&lt;/code>), etcd will eventually exhaust its storage space. If etcd runs low on storage space, it raises a space quota alarm to protect the cluster from further writes. So long as the alarm is raised, etcd responds to write requests with the error &lt;code>mvcc: database space exceeded&lt;/code>.&lt;/p>
&lt;p>To recover from the low space quota alarm:&lt;/p>
&lt;ol>
&lt;li>&lt;a href="../op-guide/maintenance/#history-compaction">Compact&lt;/a> etcd&amp;rsquo;s history.&lt;/li>
&lt;li>&lt;a href="../op-guide/maintenance/#defragmentation">Defragment&lt;/a> every etcd endpoint.&lt;/li>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/master/etcdctl#alarm-disarm" target="_blank" rel="noopener">Disarm&lt;/a> the alarm.&lt;/li>
&lt;/ol>
&lt;h3 id="what-does-the-etcd-warning-etcdserverapiv3rpc-transport-http2serverhandlestreams-failed-to-read-frame-read-tcp-1270012379-12700143020-read-connection-reset-by-peer-mean">What does the etcd warning &amp;ldquo;etcdserver/api/v3rpc: transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:2379-&amp;gt;127.0.0.1:43020: read: connection reset by peer&amp;rdquo; mean?&lt;/h3>
&lt;p>This is gRPC-side warning when a server receives a TCP RST flag with client-side streams being prematurely closed. For example, a client closes its connection, while gRPC server has not yet processed all HTTP/2 frames in the TCP queue. Some data may have been lost in server side, but it is ok so long as client connection has already been closed.&lt;/p>
&lt;p>Only &lt;a href="https://github.com/grpc/grpc-go/issues/1362" target="_blank" rel="noopener">old versions of gRPC&lt;/a> log this. etcd &lt;a href="https://github.com/etcd-io/etcd/pull/9080" target="_blank" rel="noopener">&amp;gt;=v3.2.13 by default log this with DEBUG level&lt;/a>, thus only visible with &lt;code>--debug&lt;/code> flag enabled.&lt;/p>
&lt;h2 id="performance">Performance&lt;/h2>
&lt;h3 id="how-should-i-benchmark-etcd">How should I benchmark etcd?&lt;/h3>
&lt;p>Try the &lt;a href="https://github.com/etcd-io/etcd/tree/master/tools/benchmark" target="_blank" rel="noopener">benchmark&lt;/a> tool. Current &lt;a href="https://etcd.io/docs/v3.4/op-guide/performance/">benchmark results&lt;/a> are available for comparison.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-apply-entries-took-too-long-mean">What does the etcd warning &amp;ldquo;apply entries took too long&amp;rdquo; mean?&lt;/h3>
&lt;p>After a majority of etcd members agree to commit a request, each etcd server applies the request to its data store and persists the result to disk. Even with a slow mechanical disk or a virtualized network disk, such as Amazon’s EBS or Google’s PD, applying a request should normally take fewer than 50 milliseconds. If the average apply duration exceeds 100 milliseconds, etcd will warn that entries are taking too long to apply.&lt;/p>
&lt;p>Usually this issue is caused by a slow disk. The disk could be experiencing contention among etcd and other applications, or the disk is too simply slow (e.g., a shared virtualized disk). To rule out a slow disk from causing this warning, monitor &lt;a href="../metrics/#disk">backend_commit_duration_seconds&lt;/a> (p99 duration should be less than 25ms) to confirm the disk is reasonably fast. If the disk is too slow, assigning a dedicated disk to etcd or using faster disk will typically solve the problem.&lt;/p>
&lt;p>The second most common cause is CPU starvation. If monitoring of the machine’s CPU usage shows heavy utilization, there may not be enough compute capacity for etcd. Moving etcd to dedicated machine, increasing process resource isolation cgroups, or renicing the etcd server process into a higher priority can usually solve the problem.&lt;/p>
&lt;p>Expensive user requests which access too many keys (e.g., fetching the entire keyspace) can also cause long apply latencies. Accessing fewer than a several hundred keys per request, however, should always be performant.&lt;/p>
&lt;p>If none of the above suggestions clear the warnings, please &lt;a href="https://github.com/etcd-io/etcd/issues/new" target="_blank" rel="noopener">open an issue&lt;/a> with detailed logging, monitoring, metrics and optionally workload information.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-failed-to-send-out-heartbeat-on-time-mean">What does the etcd warning &amp;ldquo;failed to send out heartbeat on time&amp;rdquo; mean?&lt;/h3>
&lt;p>etcd uses a leader-based consensus protocol for consistent data replication and log execution. Cluster members elect a single leader, all other members become followers. The elected leader must periodically send heartbeats to its followers to maintain its leadership. Followers infer leader failure if no heartbeats are received within an election interval and trigger an election. If a leader doesn’t send its heartbeats in time but is still running, the election is spurious and likely caused by insufficient resources. To catch these soft failures, if the leader skips two heartbeat intervals, etcd will warn it failed to send a heartbeat on time.&lt;/p>
&lt;p>Usually this issue is caused by a slow disk. Before the leader sends heartbeats attached with metadata, it may need to persist the metadata to disk. The disk could be experiencing contention among etcd and other applications, or the disk is too simply slow (e.g., a shared virtualized disk). To rule out a slow disk from causing this warning, monitor &lt;a href="../metrics/#disk">wal_fsync_duration_seconds&lt;/a> (p99 duration should be less than 10ms) to confirm the disk is reasonably fast. If the disk is too slow, assigning a dedicated disk to etcd or using faster disk will typically solve the problem. To tell whether a disk is fast enough for etcd, a benchmarking tool such as &lt;a href="https://github.com/axboe/fio" target="_blank" rel="noopener">fio&lt;/a> can be used. Read &lt;a href="https://www.ibm.com/blogs/bluemix/2019/04/using-fio-to-tell-whether-your-storage-is-fast-enough-for-etcd/" target="_blank" rel="noopener">here&lt;/a> for an example.&lt;/p>
&lt;p>The second most common cause is CPU starvation. If monitoring of the machine’s CPU usage shows heavy utilization, there may not be enough compute capacity for etcd. Moving etcd to dedicated machine, increasing process resource isolation with cgroups, or renicing the etcd server process into a higher priority can usually solve the problem.&lt;/p>
&lt;p>A slow network can also cause this issue. If network metrics among the etcd machines shows long latencies or high drop rate, there may not be enough network capacity for etcd. Moving etcd members to a less congested network will typically solve the problem. However, if the etcd cluster is deployed across data centers, long latency between members is expected. For such deployments, tune the &lt;code>heartbeat-interval&lt;/code> configuration to roughly match the round trip time between the machines, and the &lt;code>election-timeout&lt;/code> configuration to be at least 5 * &lt;code>heartbeat-interval&lt;/code>. See &lt;a href="../tuning/">tuning documentation&lt;/a> for detailed information.&lt;/p>
&lt;p>If none of the above suggestions clear the warnings, please &lt;a href="https://github.com/etcd-io/etcd/issues/new" target="_blank" rel="noopener">open an issue&lt;/a> with detailed logging, monitoring, metrics and optionally workload information.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-snapshotting-is-taking-more-than-x-seconds-to-finish--mean">What does the etcd warning &amp;ldquo;snapshotting is taking more than x seconds to finish &amp;hellip;&amp;rdquo; mean?&lt;/h3>
&lt;p>etcd sends a snapshot of its complete key-value store to refresh slow followers and for &lt;a href="https://etcd.io/docs/v3.4/op-guide/recovery#snapshotting-the-keyspace">backups&lt;/a>. Slow snapshot transfer times increase MTTR; if the cluster is ingesting data with high throughput, slow followers may livelock by needing a new snapshot before finishing receiving a snapshot. To catch slow snapshot performance, etcd warns when sending a snapshot takes more than thirty seconds and exceeds the expected transfer time for a 1Gbps connection.&lt;/p></description></item><item><title>Docs: FAQ</title><link>https://etcd.io/docs/v3.5/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/faq/</guid><description>
&lt;h2 id="etcd-general">etcd, general&lt;/h2>
&lt;h3 id="what-is-etcd">What is etcd?&lt;/h3>
&lt;p>etcd is a consistent distributed key-value store. Mainly used as a separate coordination service, in distributed systems. And designed to hold small amounts of data that can fit entirely in memory.&lt;/p>
&lt;h3 id="how-do-you-pronounce-etcd">How do you pronounce etcd?&lt;/h3>
&lt;p>etcd is pronounced &lt;strong>/ˈɛtsiːdiː/&lt;/strong>, and means &amp;ldquo;distributed &lt;code>etc&lt;/code> directory.&amp;rdquo;&lt;/p>
&lt;h3 id="do-clients-have-to-send-requests-to-the-etcd-leader">Do clients have to send requests to the etcd leader?&lt;/h3>
&lt;p>&lt;a href="https://raft.github.io/raft.pdf" target="_blank" rel="noopener">Raft&lt;/a> is leader-based; the leader handles all client requests which need cluster consensus. However, the client does not need to know which node is the leader. Any request that requires consensus sent to a follower is automatically forwarded to the leader. Requests that do not require consensus (e.g., serialized reads) can be processed by any cluster member.&lt;/p>
&lt;h2 id="configuration">Configuration&lt;/h2>
&lt;h3 id="what-is-the-difference-between-listen-clientpeer-urls-advertise-client-urls-or-initial-advertise-peer-urls">What is the difference between listen-&amp;lt;client,peer&amp;gt;-urls, advertise-client-urls or initial-advertise-peer-urls?&lt;/h3>
&lt;p>&lt;code>listen-client-urls&lt;/code> and &lt;code>listen-peer-urls&lt;/code> specify the local addresses etcd server binds to for accepting incoming connections. To listen on a port for all interfaces, specify &lt;code>0.0.0.0&lt;/code> as the listen IP address.&lt;/p>
&lt;p>&lt;code>advertise-client-urls&lt;/code> and &lt;code>initial-advertise-peer-urls&lt;/code> specify the addresses etcd clients or other etcd members should use to contact the etcd server. The advertise addresses must be reachable from the remote machines. Do not advertise addresses like &lt;code>localhost&lt;/code> or &lt;code>0.0.0.0&lt;/code> for a production setup since these addresses are unreachable from remote machines.&lt;/p>
&lt;h3 id="why-doesnt-changing---listen-peer-urls-or---initial-advertise-peer-urls-update-the-advertised-peer-urls-in-etcdctl-member-list">Why doesn&amp;rsquo;t changing &lt;code>--listen-peer-urls&lt;/code> or &lt;code>--initial-advertise-peer-urls&lt;/code> update the advertised peer URLs in &lt;code>etcdctl member list&lt;/code>?&lt;/h3>
&lt;p>A member&amp;rsquo;s advertised peer URLs come from &lt;code>--initial-advertise-peer-urls&lt;/code> on initial cluster boot. Changing the listen peer URLs or the initial advertise peers after booting the member won&amp;rsquo;t affect the exported advertise peer URLs since changes must go through quorum to avoid membership configuration split brain. Use &lt;code>etcdctl member update&lt;/code> to update a member&amp;rsquo;s peer URLs.&lt;/p>
&lt;h2 id="deployment">Deployment&lt;/h2>
&lt;h3 id="system-requirements">System requirements&lt;/h3>
&lt;p>Since etcd writes data to disk, its performance strongly depends on disk performance. For this reason, SSD is highly recommended. To assess whether a disk is fast enough for etcd, one possibility is using a disk benchmarking tool such as &lt;a href="https://github.com/axboe/fio" target="_blank" rel="noopener">fio&lt;/a>. For an example on how to do that, read &lt;a href="https://www.ibm.com/cloud/blog/using-fio-to-tell-whether-your-storage-is-fast-enough-for-etcd" target="_blank" rel="noopener">here&lt;/a>. To prevent performance degradation or unintentionally overloading the key-value store, etcd enforces a configurable storage size quota set to 2GB by default. To avoid swapping or running out of memory, the machine should have at least as much RAM to cover the quota. 8GB is a suggested maximum size for normal environments and etcd warns at startup if the configured value exceeds it. At CoreOS, an etcd cluster is usually deployed on dedicated CoreOS Container Linux machines with dual-core processors, 2GB of RAM, and 80GB of SSD &lt;em>at the very least&lt;/em>. &lt;strong>Note that performance is intrinsically workload dependent; please test before production deployment&lt;/strong>. See &lt;a href="../op-guide/hardware/">hardware&lt;/a> for more recommendations.&lt;/p>
&lt;p>Most stable production environment is Linux operating system with amd64 architecture; see &lt;a href="../op-guide/supported-platform/">supported platform&lt;/a> for more.&lt;/p>
&lt;h3 id="why-an-odd-number-of-cluster-members">Why an odd number of cluster members?&lt;/h3>
&lt;p>An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. For a cluster with n members, quorum is (n/2)+1. For any odd-sized cluster, adding one node will always increase the number of nodes necessary for quorum. Although adding a node to an odd-sized cluster appears better since there are more machines, the fault tolerance is worse since exactly the same number of nodes may fail without losing quorum but there are more nodes that can fail. If the cluster is in a state where it can&amp;rsquo;t tolerate any more failures, adding a node before removing nodes is dangerous because if the new node fails to register with the cluster (e.g., the address is misconfigured), quorum will be permanently lost.&lt;/p>
&lt;h3 id="what-is-maximum-cluster-size">What is maximum cluster size?&lt;/h3>
&lt;p>Theoretically, there is no hard limit. However, an etcd cluster probably should have no more than seven nodes. &lt;a href="http://static.googleusercontent.com/media/research.google.com/en//archive/chubby-osdi06.pdf" target="_blank" rel="noopener">Google Chubby lock service&lt;/a>, similar to etcd and widely deployed within Google for many years, suggests running five nodes. A 5-member etcd cluster can tolerate two member failures, which is enough in most cases. Although larger clusters provide better fault tolerance, the write performance suffers because data must be replicated across more machines.&lt;/p>
&lt;h3 id="what-is-failure-tolerance">What is failure tolerance?&lt;/h3>
&lt;p>An etcd cluster operates so long as a member quorum can be established. If quorum is lost through transient network failures (e.g., partitions), etcd automatically and safely resumes once the network recovers and restores quorum; Raft enforces cluster consistency. For power loss, etcd persists the Raft log to disk; etcd replays the log to the point of failure and resumes cluster participation. For permanent hardware failure, the node may be removed from the cluster through &lt;a href="../op-guide/runtime-configuration/">runtime reconfiguration&lt;/a>.&lt;/p>
&lt;p>It is recommended to have an odd number of members in a cluster. An odd-size cluster tolerates the same number of failures as an even-size cluster but with fewer nodes. The difference can be seen by comparing even and odd sized clusters:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:center">Cluster Size&lt;/th>
&lt;th style="text-align:center">Majority&lt;/th>
&lt;th style="text-align:center">Failure Tolerance&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:center">1&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">6&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">7&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">8&lt;/td>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">9&lt;/td>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Adding a member to bring the size of cluster up to an even number doesn&amp;rsquo;t buy additional fault tolerance. Likewise, during a network partition, an odd number of members guarantees that there will always be a majority partition that can continue to operate and be the source of truth when the partition ends.&lt;/p>
&lt;h3 id="does-etcd-work-in-cross-region-or-cross-data-center-deployments">Does etcd work in cross-region or cross data center deployments?&lt;/h3>
&lt;p>Deploying etcd across regions improves etcd&amp;rsquo;s fault tolerance since members are in separate failure domains. The cost is higher consensus request latency from crossing data center boundaries. Since etcd relies on a member quorum for consensus, the latency from crossing data centers will be somewhat pronounced because at least a majority of cluster members must respond to consensus requests. Additionally, cluster data must be replicated across all peers, so there will be bandwidth cost as well.&lt;/p>
&lt;p>With longer latencies, the default etcd configuration may cause frequent elections or heartbeat timeouts. See &lt;a href="../tuning/">tuning&lt;/a> for adjusting timeouts for high latency deployments.&lt;/p>
&lt;h2 id="operation">Operation&lt;/h2>
&lt;h3 id="how-to-backup-a-etcd-cluster">How to backup a etcd cluster?&lt;/h3>
&lt;p>etcdctl provides a &lt;code>snapshot&lt;/code> command to create backups. See &lt;a href="../op-guide/recovery/#snapshotting-the-keyspace">backup&lt;/a> for more details.&lt;/p>
&lt;h3 id="should-i-add-a-member-before-removing-an-unhealthy-member">Should I add a member before removing an unhealthy member?&lt;/h3>
&lt;p>When replacing an etcd node, it&amp;rsquo;s important to remove the member first and then add its replacement.&lt;/p>
&lt;p>etcd employs distributed consensus based on a quorum model; (n/2)+1 members, a majority, must agree on a proposal before it can be committed to the cluster. These proposals include key-value updates and membership changes. This model totally avoids any possibility of split brain inconsistency. The downside is permanent quorum loss is catastrophic.&lt;/p>
&lt;p>How this applies to membership: If a 3-member cluster has 1 downed member, it can still make forward progress because the quorum is 2 and 2 members are still live. However, adding a new member to a 3-member cluster will increase the quorum to 3 because 3 votes are required for a majority of 4 members. Since the quorum increased, this extra member buys nothing in terms of fault tolerance; the cluster is still one node failure away from being unrecoverable.&lt;/p>
&lt;p>Additionally, that new member is risky because it may turn out to be misconfigured or incapable of joining the cluster. In that case, there&amp;rsquo;s no way to recover quorum because the cluster has two members down and two members up, but needs three votes to change membership to undo the botched membership addition. etcd will by default reject member add attempts that could take down the cluster in this manner.&lt;/p>
&lt;p>On the other hand, if the downed member is removed from cluster membership first, the number of members becomes 2 and the quorum remains at 2. Following that removal by adding a new member will also keep the quorum steady at 2. So, even if the new node can&amp;rsquo;t be brought up, it&amp;rsquo;s still possible to remove the new member through quorum on the remaining live members.&lt;/p>
&lt;h3 id="why-wont-etcd-accept-my-membership-changes">Why won&amp;rsquo;t etcd accept my membership changes?&lt;/h3>
&lt;p>etcd sets &lt;code>strict-reconfig-check&lt;/code> in order to reject reconfiguration requests that would cause quorum loss. Abandoning quorum is really risky (especially when the cluster is already unhealthy). Although it may be tempting to disable quorum checking if there&amp;rsquo;s quorum loss to add a new member, this could lead to full fledged cluster inconsistency. For many applications, this will make the problem even worse (&amp;ldquo;disk geometry corruption&amp;rdquo; being a candidate for most terrifying).&lt;/p>
&lt;h3 id="why-does-etcd-lose-its-leader-from-disk-latency-spikes">Why does etcd lose its leader from disk latency spikes?&lt;/h3>
&lt;p>This is intentional; disk latency is part of leader liveness. Suppose the cluster leader takes a minute to fsync a raft log update to disk, but the etcd cluster has a one second election timeout. Even though the leader can process network messages within the election interval (e.g., send heartbeats), it&amp;rsquo;s effectively unavailable because it can&amp;rsquo;t commit any new proposals; it&amp;rsquo;s waiting on the slow disk. If the cluster frequently loses its leader due to disk latencies, try &lt;a href="../tuning/">tuning&lt;/a> the disk settings or etcd time parameters.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-request-ignored-cluster-id-mismatch-mean">What does the etcd warning &amp;ldquo;request ignored (cluster ID mismatch)&amp;rdquo; mean?&lt;/h3>
&lt;p>Every new etcd cluster generates a new cluster ID based on the initial cluster configuration and a user-provided unique &lt;code>initial-cluster-token&lt;/code> value. By having unique cluster ID&amp;rsquo;s, etcd is protected from cross-cluster interaction which could corrupt the cluster.&lt;/p>
&lt;p>Usually this warning happens after tearing down an old cluster, then reusing some of the peer addresses for the new cluster. If any etcd process from the old cluster is still running it will try to contact the new cluster. The new cluster will recognize a cluster ID mismatch, then ignore the request and emit this warning. This warning is often cleared by ensuring peer addresses among distinct clusters are disjoint.&lt;/p>
&lt;h3 id="what-does-mvcc-database-space-exceeded-mean-and-how-do-i-fix-it">What does &amp;ldquo;mvcc: database space exceeded&amp;rdquo; mean and how do I fix it?&lt;/h3>
&lt;p>The &lt;a href="../learning/api/#revisions">multi-version concurrency control&lt;/a> data model in etcd keeps an exact history of the keyspace. Without periodically compacting this history (e.g., by setting &lt;code>--auto-compaction&lt;/code>), etcd will eventually exhaust its storage space. If etcd runs low on storage space, it raises a space quota alarm to protect the cluster from further writes. So long as the alarm is raised, etcd responds to write requests with the error &lt;code>mvcc: database space exceeded&lt;/code>.&lt;/p>
&lt;p>To recover from the low space quota alarm:&lt;/p>
&lt;ol>
&lt;li>&lt;a href="../op-guide/maintenance/#history-compaction-v3-api-key-value-database">Compact&lt;/a> etcd&amp;rsquo;s history.&lt;/li>
&lt;li>&lt;a href="../op-guide/maintenance/#defragmentation">Defragment&lt;/a> every etcd endpoint.&lt;/li>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/blob/master/etcdctl/README.md#alarm-disarm" target="_blank" rel="noopener">Disarm&lt;/a> the alarm.&lt;/li>
&lt;/ol>
&lt;h3 id="what-does-the-etcd-warning-etcdserverapiv3rpc-transport-http2serverhandlestreams-failed-to-read-frame-read-tcp-1270012379-12700143020-read-connection-reset-by-peer-mean">What does the etcd warning &amp;ldquo;etcdserver/api/v3rpc: transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:2379-&amp;gt;127.0.0.1:43020: read: connection reset by peer&amp;rdquo; mean?&lt;/h3>
&lt;p>This is gRPC-side warning when a server receives a TCP RST flag with client-side streams being prematurely closed. For example, a client closes its connection, while gRPC server has not yet processed all HTTP/2 frames in the TCP queue. Some data may have been lost in server side, but it is ok so long as client connection has already been closed.&lt;/p>
&lt;p>Only &lt;a href="https://github.com/grpc/grpc-go/issues/1362" target="_blank" rel="noopener">old versions of gRPC&lt;/a> log this. etcd &lt;a href="https://github.com/etcd-io/etcd/pull/9080" target="_blank" rel="noopener">&amp;gt;=v3.2.13 by default log this with DEBUG level&lt;/a>, thus only visible with &lt;code>--log-level=debug&lt;/code> flag enabled.&lt;/p>
&lt;h2 id="performance">Performance&lt;/h2>
&lt;h3 id="how-should-i-benchmark-etcd">How should I benchmark etcd?&lt;/h3>
&lt;p>Try the &lt;a href="https://github.com/etcd-io/etcd/tree/master/tools/benchmark" target="_blank" rel="noopener">benchmark&lt;/a> tool. Current &lt;a href="../op-guide/performance/">benchmark results&lt;/a> are available for comparison.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-apply-entries-took-too-long-mean">What does the etcd warning &amp;ldquo;apply entries took too long&amp;rdquo; mean?&lt;/h3>
&lt;p>After a majority of etcd members agree to commit a request, each etcd server applies the request to its data store and persists the result to disk. Even with a slow mechanical disk or a virtualized network disk, such as Amazon’s EBS or Google’s PD, applying a request should normally take fewer than 50 milliseconds. If the average apply duration exceeds 100 milliseconds, etcd will warn that entries are taking too long to apply.&lt;/p>
&lt;p>Usually this issue is caused by a slow disk. The disk could be experiencing contention among etcd and other applications, or the disk is too simply slow (e.g., a shared virtualized disk). To rule out a slow disk from causing this warning, monitor &lt;a href="../metrics/#disk">backend_commit_duration_seconds&lt;/a> (p99 duration should be less than 25ms) to confirm the disk is reasonably fast. If the disk is too slow, assigning a dedicated disk to etcd or using faster disk will typically solve the problem.&lt;/p>
&lt;p>The second most common cause is CPU starvation. If monitoring of the machine’s CPU usage shows heavy utilization, there may not be enough compute capacity for etcd. Moving etcd to dedicated machine, increasing process resource isolation cgroups, or renicing the etcd server process into a higher priority can usually solve the problem.&lt;/p>
&lt;p>Expensive user requests which access too many keys (e.g., fetching the entire keyspace) can also cause long apply latencies. Accessing fewer than a several hundred keys per request, however, should always be performant.&lt;/p>
&lt;p>If none of the above suggestions clear the warnings, please &lt;a href="https://github.com/etcd-io/etcd/issues/new" target="_blank" rel="noopener">open an issue&lt;/a> with detailed logging, monitoring, metrics and optionally workload information.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-failed-to-send-out-heartbeat-on-time-mean">What does the etcd warning &amp;ldquo;failed to send out heartbeat on time&amp;rdquo; mean?&lt;/h3>
&lt;p>etcd uses a leader-based consensus protocol for consistent data replication and log execution. Cluster members elect a single leader, all other members become followers. The elected leader must periodically send heartbeats to its followers to maintain its leadership. Followers infer leader failure if no heartbeats are received within an election interval and trigger an election. If a leader doesn’t send its heartbeats in time but is still running, the election is spurious and likely caused by insufficient resources. To catch these soft failures, if the leader skips two heartbeat intervals, etcd will warn it failed to send a heartbeat on time.&lt;/p>
&lt;p>Usually this issue is caused by a slow disk. Before the leader sends heartbeats attached with metadata, it may need to persist the metadata to disk. The disk could be experiencing contention among etcd and other applications, or the disk is too simply slow (e.g., a shared virtualized disk). To rule out a slow disk from causing this warning, monitor &lt;a href="../metrics/#disk">wal_fsync_duration_seconds&lt;/a> (p99 duration should be less than 10ms) to confirm the disk is reasonably fast. If the disk is too slow, assigning a dedicated disk to etcd or using faster disk will typically solve the problem. To tell whether a disk is fast enough for etcd, a benchmarking tool such as &lt;a href="https://github.com/axboe/fio" target="_blank" rel="noopener">fio&lt;/a> can be used. Read &lt;a href="https://www.ibm.com/cloud/blog/using-fio-to-tell-whether-your-storage-is-fast-enough-for-etcd" target="_blank" rel="noopener">here&lt;/a> for an example.&lt;/p>
&lt;p>The second most common cause is CPU starvation. If monitoring of the machine’s CPU usage shows heavy utilization, there may not be enough compute capacity for etcd. Moving etcd to dedicated machine, increasing process resource isolation with cgroups, or renicing the etcd server process into a higher priority can usually solve the problem.&lt;/p>
&lt;p>A slow network can also cause this issue. If network metrics among the etcd machines shows long latencies or high drop rate, there may not be enough network capacity for etcd. Moving etcd members to a less congested network will typically solve the problem. However, if the etcd cluster is deployed across data centers, long latency between members is expected. For such deployments, tune the &lt;code>heartbeat-interval&lt;/code> configuration to roughly match the round trip time between the machines, and the &lt;code>election-timeout&lt;/code> configuration to be at least 5 * &lt;code>heartbeat-interval&lt;/code>. See &lt;a href="../tuning/">tuning documentation&lt;/a> for detailed information.&lt;/p>
&lt;p>If none of the above suggestions clear the warnings, please &lt;a href="https://github.com/etcd-io/etcd/issues/new" target="_blank" rel="noopener">open an issue&lt;/a> with detailed logging, monitoring, metrics and optionally workload information.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-snapshotting-is-taking-more-than-x-seconds-to-finish--mean">What does the etcd warning &amp;ldquo;snapshotting is taking more than x seconds to finish &amp;hellip;&amp;rdquo; mean?&lt;/h3>
&lt;p>etcd sends a snapshot of its complete key-value store to refresh slow followers and for &lt;a href="../op-guide/recovery/#snapshotting-the-keyspace">backups&lt;/a>. Slow snapshot transfer times increase MTTR; if the cluster is ingesting data with high throughput, slow followers may livelock by needing a new snapshot before finishing receiving a snapshot. To catch slow snapshot performance, etcd warns when sending a snapshot takes more than thirty seconds and exceeds the expected transfer time for a 1Gbps connection.&lt;/p></description></item><item><title>Docs: FAQ</title><link>https://etcd.io/docs/v3.6/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/faq/</guid><description>
&lt;h2 id="etcd-general">etcd, general&lt;/h2>
&lt;h3 id="what-is-etcd">What is etcd?&lt;/h3>
&lt;p>etcd is a consistent distributed key-value store. Mainly used as a separate coordination service, in distributed systems. And designed to hold small amounts of data that can fit entirely in memory.&lt;/p>
&lt;h3 id="how-do-you-pronounce-etcd">How do you pronounce etcd?&lt;/h3>
&lt;p>etcd is pronounced &lt;strong>/ˈɛtsiːdiː/&lt;/strong>, and means &amp;ldquo;distributed &lt;code>etc&lt;/code> directory.&amp;rdquo;&lt;/p>
&lt;h3 id="do-clients-have-to-send-requests-to-the-etcd-leader">Do clients have to send requests to the etcd leader?&lt;/h3>
&lt;p>&lt;a href="https://raft.github.io/raft.pdf" target="_blank" rel="noopener">Raft&lt;/a> is leader-based; the leader handles all client requests which need cluster consensus. However, the client does not need to know which node is the leader. Any request that requires consensus sent to a follower is automatically forwarded to the leader. Requests that do not require consensus (e.g., serialized reads) can be processed by any cluster member.&lt;/p>
&lt;h2 id="configuration">Configuration&lt;/h2>
&lt;h3 id="what-is-the-difference-between-listen-clientpeer-urls-advertise-client-urls-or-initial-advertise-peer-urls">What is the difference between listen-&amp;lt;client,peer&amp;gt;-urls, advertise-client-urls or initial-advertise-peer-urls?&lt;/h3>
&lt;p>&lt;code>listen-client-urls&lt;/code> and &lt;code>listen-peer-urls&lt;/code> specify the local addresses etcd server binds to for accepting incoming connections. To listen on a port for all interfaces, specify &lt;code>0.0.0.0&lt;/code> as the listen IP address.&lt;/p>
&lt;p>&lt;code>advertise-client-urls&lt;/code> and &lt;code>initial-advertise-peer-urls&lt;/code> specify the addresses etcd clients or other etcd members should use to contact the etcd server. The advertise addresses must be reachable from the remote machines. Do not advertise addresses like &lt;code>localhost&lt;/code> or &lt;code>0.0.0.0&lt;/code> for a production setup since these addresses are unreachable from remote machines.&lt;/p>
&lt;h3 id="why-doesnt-changing---listen-peer-urls-or---initial-advertise-peer-urls-update-the-advertised-peer-urls-in-etcdctl-member-list">Why doesn&amp;rsquo;t changing &lt;code>--listen-peer-urls&lt;/code> or &lt;code>--initial-advertise-peer-urls&lt;/code> update the advertised peer URLs in &lt;code>etcdctl member list&lt;/code>?&lt;/h3>
&lt;p>A member&amp;rsquo;s advertised peer URLs come from &lt;code>--initial-advertise-peer-urls&lt;/code> on initial cluster boot. Changing the listen peer URLs or the initial advertise peers after booting the member won&amp;rsquo;t affect the exported advertise peer URLs since changes must go through quorum to avoid membership configuration split brain. Use &lt;code>etcdctl member update&lt;/code> to update a member&amp;rsquo;s peer URLs.&lt;/p>
&lt;h2 id="deployment">Deployment&lt;/h2>
&lt;h3 id="system-requirements">System requirements&lt;/h3>
&lt;p>Since etcd writes data to disk, its performance strongly depends on disk performance. For this reason, SSD is highly recommended. To assess whether a disk is fast enough for etcd, one possibility is using a disk benchmarking tool such as &lt;a href="https://github.com/axboe/fio" target="_blank" rel="noopener">fio&lt;/a>. For an example on how to do that, read &lt;a href="https://www.ibm.com/cloud/blog/using-fio-to-tell-whether-your-storage-is-fast-enough-for-etcd" target="_blank" rel="noopener">here&lt;/a>. To prevent performance degradation or unintentionally overloading the key-value store, etcd enforces a configurable storage size quota set to 2GB by default. To avoid swapping or running out of memory, the machine should have at least as much RAM to cover the quota. 8GB is a suggested maximum size for normal environments and etcd warns at startup if the configured value exceeds it. At CoreOS, an etcd cluster is usually deployed on dedicated CoreOS Container Linux machines with dual-core processors, 2GB of RAM, and 80GB of SSD &lt;em>at the very least&lt;/em>. &lt;strong>Note that performance is intrinsically workload dependent; please test before production deployment&lt;/strong>. See &lt;a href="../op-guide/hardware/">hardware&lt;/a> for more recommendations.&lt;/p>
&lt;p>Most stable production environment is Linux operating system with amd64 architecture; see &lt;a href="../op-guide/supported-platform/">supported platform&lt;/a> for more.&lt;/p>
&lt;h3 id="why-an-odd-number-of-cluster-members">Why an odd number of cluster members?&lt;/h3>
&lt;p>An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. For a cluster with n members, quorum is (n/2)+1. For any odd-sized cluster, adding one node will always increase the number of nodes necessary for quorum. Although adding a node to an odd-sized cluster appears better since there are more machines, the fault tolerance is worse since exactly the same number of nodes may fail without losing quorum but there are more nodes that can fail. If the cluster is in a state where it can&amp;rsquo;t tolerate any more failures, adding a node before removing nodes is dangerous because if the new node fails to register with the cluster (e.g., the address is misconfigured), quorum will be permanently lost.&lt;/p>
&lt;h3 id="what-is-maximum-cluster-size">What is maximum cluster size?&lt;/h3>
&lt;p>Theoretically, there is no hard limit. However, an etcd cluster probably should have no more than seven nodes. &lt;a href="http://static.googleusercontent.com/media/research.google.com/en//archive/chubby-osdi06.pdf" target="_blank" rel="noopener">Google Chubby lock service&lt;/a>, similar to etcd and widely deployed within Google for many years, suggests running five nodes. A 5-member etcd cluster can tolerate two member failures, which is enough in most cases. Although larger clusters provide better fault tolerance, the write performance suffers because data must be replicated across more machines.&lt;/p>
&lt;h3 id="what-is-failure-tolerance">What is failure tolerance?&lt;/h3>
&lt;p>An etcd cluster operates so long as a member quorum can be established. If quorum is lost through transient network failures (e.g., partitions), etcd automatically and safely resumes once the network recovers and restores quorum; Raft enforces cluster consistency. For power loss, etcd persists the Raft log to disk; etcd replays the log to the point of failure and resumes cluster participation. For permanent hardware failure, the node may be removed from the cluster through &lt;a href="../op-guide/runtime-configuration/">runtime reconfiguration&lt;/a>.&lt;/p>
&lt;p>It is recommended to have an odd number of members in a cluster. An odd-size cluster tolerates the same number of failures as an even-size cluster but with fewer nodes. The difference can be seen by comparing even and odd sized clusters:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:center">Cluster Size&lt;/th>
&lt;th style="text-align:center">Majority&lt;/th>
&lt;th style="text-align:center">Failure Tolerance&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:center">1&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">6&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">7&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">8&lt;/td>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">9&lt;/td>
&lt;td style="text-align:center">5&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Adding a member to bring the size of cluster up to an even number doesn&amp;rsquo;t buy additional fault tolerance. Likewise, during a network partition, an odd number of members guarantees that there will always be a majority partition that can continue to operate and be the source of truth when the partition ends.&lt;/p>
&lt;h3 id="does-etcd-work-in-cross-region-or-cross-data-center-deployments">Does etcd work in cross-region or cross data center deployments?&lt;/h3>
&lt;p>Deploying etcd across regions improves etcd&amp;rsquo;s fault tolerance since members are in separate failure domains. The cost is higher consensus request latency from crossing data center boundaries. Since etcd relies on a member quorum for consensus, the latency from crossing data centers will be somewhat pronounced because at least a majority of cluster members must respond to consensus requests. Additionally, cluster data must be replicated across all peers, so there will be bandwidth cost as well.&lt;/p>
&lt;p>With longer latencies, the default etcd configuration may cause frequent elections or heartbeat timeouts. See &lt;a href="../tuning/">tuning&lt;/a> for adjusting timeouts for high latency deployments.&lt;/p>
&lt;h2 id="operation">Operation&lt;/h2>
&lt;h3 id="how-to-backup-a-etcd-cluster">How to backup a etcd cluster?&lt;/h3>
&lt;p>etcdctl provides a &lt;code>snapshot&lt;/code> command to create backups. See &lt;a href="../op-guide/recovery/#snapshotting-the-keyspace">backup&lt;/a> for more details.&lt;/p>
&lt;h3 id="should-i-add-a-member-before-removing-an-unhealthy-member">Should I add a member before removing an unhealthy member?&lt;/h3>
&lt;p>When replacing an etcd node, it&amp;rsquo;s important to remove the member first and then add its replacement.&lt;/p>
&lt;p>etcd employs distributed consensus based on a quorum model; (n/2)+1 members, a majority, must agree on a proposal before it can be committed to the cluster. These proposals include key-value updates and membership changes. This model totally avoids any possibility of split brain inconsistency. The downside is permanent quorum loss is catastrophic.&lt;/p>
&lt;p>How this applies to membership: If a 3-member cluster has 1 downed member, it can still make forward progress because the quorum is 2 and 2 members are still live. However, adding a new member to a 3-member cluster will increase the quorum to 3 because 3 votes are required for a majority of 4 members. Since the quorum increased, this extra member buys nothing in terms of fault tolerance; the cluster is still one node failure away from being unrecoverable.&lt;/p>
&lt;p>Additionally, that new member is risky because it may turn out to be misconfigured or incapable of joining the cluster. In that case, there&amp;rsquo;s no way to recover quorum because the cluster has two members down and two members up, but needs three votes to change membership to undo the botched membership addition. etcd will by default reject member add attempts that could take down the cluster in this manner.&lt;/p>
&lt;p>On the other hand, if the downed member is removed from cluster membership first, the number of members becomes 2 and the quorum remains at 2. Following that removal by adding a new member will also keep the quorum steady at 2. So, even if the new node can&amp;rsquo;t be brought up, it&amp;rsquo;s still possible to remove the new member through quorum on the remaining live members.&lt;/p>
&lt;h3 id="why-wont-etcd-accept-my-membership-changes">Why won&amp;rsquo;t etcd accept my membership changes?&lt;/h3>
&lt;p>etcd sets &lt;code>strict-reconfig-check&lt;/code> in order to reject reconfiguration requests that would cause quorum loss. Abandoning quorum is really risky (especially when the cluster is already unhealthy). Although it may be tempting to disable quorum checking if there&amp;rsquo;s quorum loss to add a new member, this could lead to full fledged cluster inconsistency. For many applications, this will make the problem even worse (&amp;ldquo;disk geometry corruption&amp;rdquo; being a candidate for most terrifying).&lt;/p>
&lt;h3 id="why-does-etcd-lose-its-leader-from-disk-latency-spikes">Why does etcd lose its leader from disk latency spikes?&lt;/h3>
&lt;p>This is intentional; disk latency is part of leader liveness. Suppose the cluster leader takes a minute to fsync a raft log update to disk, but the etcd cluster has a one second election timeout. Even though the leader can process network messages within the election interval (e.g., send heartbeats), it&amp;rsquo;s effectively unavailable because it can&amp;rsquo;t commit any new proposals; it&amp;rsquo;s waiting on the slow disk. If the cluster frequently loses its leader due to disk latencies, try &lt;a href="../tuning/">tuning&lt;/a> the disk settings or etcd time parameters.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-request-ignored-cluster-id-mismatch-mean">What does the etcd warning &amp;ldquo;request ignored (cluster ID mismatch)&amp;rdquo; mean?&lt;/h3>
&lt;p>Every new etcd cluster generates a new cluster ID based on the initial cluster configuration and a user-provided unique &lt;code>initial-cluster-token&lt;/code> value. By having unique cluster ID&amp;rsquo;s, etcd is protected from cross-cluster interaction which could corrupt the cluster.&lt;/p>
&lt;p>Usually this warning happens after tearing down an old cluster, then reusing some of the peer addresses for the new cluster. If any etcd process from the old cluster is still running it will try to contact the new cluster. The new cluster will recognize a cluster ID mismatch, then ignore the request and emit this warning. This warning is often cleared by ensuring peer addresses among distinct clusters are disjoint.&lt;/p>
&lt;h3 id="what-does-mvcc-database-space-exceeded-mean-and-how-do-i-fix-it">What does &amp;ldquo;mvcc: database space exceeded&amp;rdquo; mean and how do I fix it?&lt;/h3>
&lt;p>The &lt;a href="../learning/api/#revisions">multi-version concurrency control&lt;/a> data model in etcd keeps an exact history of the keyspace. Without periodically compacting this history (e.g., by setting &lt;code>--auto-compaction&lt;/code>), etcd will eventually exhaust its storage space. If etcd runs low on storage space, it raises a space quota alarm to protect the cluster from further writes. So long as the alarm is raised, etcd responds to write requests with the error &lt;code>mvcc: database space exceeded&lt;/code>.&lt;/p>
&lt;p>To recover from the low space quota alarm:&lt;/p>
&lt;ol>
&lt;li>&lt;a href="../op-guide/maintenance/#history-compaction-v3-api-key-value-database">Compact&lt;/a> etcd&amp;rsquo;s history.&lt;/li>
&lt;li>&lt;a href="../op-guide/maintenance/#defragmentation">Defragment&lt;/a> every etcd endpoint.&lt;/li>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/blob/main/etcdctl/README.md#alarm-disarm" target="_blank" rel="noopener">Disarm&lt;/a> the alarm.&lt;/li>
&lt;/ol>
&lt;h3 id="what-does-the-etcd-warning-etcdserverapiv3rpc-transport-http2serverhandlestreams-failed-to-read-frame-read-tcp-1270012379-12700143020-read-connection-reset-by-peer-mean">What does the etcd warning &amp;ldquo;etcdserver/api/v3rpc: transport: http2Server.HandleStreams failed to read frame: read tcp 127.0.0.1:2379-&amp;gt;127.0.0.1:43020: read: connection reset by peer&amp;rdquo; mean?&lt;/h3>
&lt;p>This is gRPC-side warning when a server receives a TCP RST flag with client-side streams being prematurely closed. For example, a client closes its connection, while gRPC server has not yet processed all HTTP/2 frames in the TCP queue. Some data may have been lost in server side, but it is ok so long as client connection has already been closed.&lt;/p>
&lt;p>Only &lt;a href="https://github.com/grpc/grpc-go/issues/1362" target="_blank" rel="noopener">old versions of gRPC&lt;/a> log this. etcd &lt;a href="https://github.com/etcd-io/etcd/pull/9080" target="_blank" rel="noopener">&amp;gt;=v3.2.13 by default log this with DEBUG level&lt;/a>, thus only visible with &lt;code>--log-level=debug&lt;/code> flag enabled.&lt;/p>
&lt;h2 id="performance">Performance&lt;/h2>
&lt;h3 id="how-should-i-benchmark-etcd">How should I benchmark etcd?&lt;/h3>
&lt;p>Try the &lt;a href="https://github.com/etcd-io/etcd/tree/main/tools/benchmark" target="_blank" rel="noopener">benchmark&lt;/a> tool. Current &lt;a href="../op-guide/performance/">benchmark results&lt;/a> are available for comparison.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-apply-entries-took-too-long-mean">What does the etcd warning &amp;ldquo;apply entries took too long&amp;rdquo; mean?&lt;/h3>
&lt;p>After a majority of etcd members agree to commit a request, each etcd server applies the request to its data store and persists the result to disk. Even with a slow mechanical disk or a virtualized network disk, such as Amazon’s EBS or Google’s PD, applying a request should normally take fewer than 50 milliseconds. If the average apply duration exceeds 100 milliseconds, etcd will warn that entries are taking too long to apply.&lt;/p>
&lt;p>Usually this issue is caused by a slow disk. The disk could be experiencing contention among etcd and other applications, or the disk is too simply slow (e.g., a shared virtualized disk). To rule out a slow disk from causing this warning, monitor &lt;a href="../metrics/#disk">backend_commit_duration_seconds&lt;/a> (p99 duration should be less than 25ms) to confirm the disk is reasonably fast. If the disk is too slow, assigning a dedicated disk to etcd or using faster disk will typically solve the problem.&lt;/p>
&lt;p>The second most common cause is CPU starvation. If monitoring of the machine’s CPU usage shows heavy utilization, there may not be enough compute capacity for etcd. Moving etcd to dedicated machine, increasing process resource isolation cgroups, or renicing the etcd server process into a higher priority can usually solve the problem.&lt;/p>
&lt;p>Expensive user requests which access too many keys (e.g., fetching the entire keyspace) can also cause long apply latencies. Accessing fewer than a several hundred keys per request, however, should always be performant.&lt;/p>
&lt;p>If none of the above suggestions clear the warnings, please &lt;a href="https://github.com/etcd-io/etcd/issues/new" target="_blank" rel="noopener">open an issue&lt;/a> with detailed logging, monitoring, metrics and optionally workload information.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-failed-to-send-out-heartbeat-on-time-mean">What does the etcd warning &amp;ldquo;failed to send out heartbeat on time&amp;rdquo; mean?&lt;/h3>
&lt;p>etcd uses a leader-based consensus protocol for consistent data replication and log execution. Cluster members elect a single leader, all other members become followers. The elected leader must periodically send heartbeats to its followers to maintain its leadership. Followers infer leader failure if no heartbeats are received within an election interval and trigger an election. If a leader doesn’t send its heartbeats in time but is still running, the election is spurious and likely caused by insufficient resources. To catch these soft failures, if the leader skips two heartbeat intervals, etcd will warn it failed to send a heartbeat on time.&lt;/p>
&lt;p>Usually this issue is caused by a slow disk. Before the leader sends heartbeats attached with metadata, it may need to persist the metadata to disk. The disk could be experiencing contention among etcd and other applications, or the disk is too simply slow (e.g., a shared virtualized disk). To rule out a slow disk from causing this warning, monitor &lt;a href="../metrics/#disk">wal_fsync_duration_seconds&lt;/a> (p99 duration should be less than 10ms) to confirm the disk is reasonably fast. If the disk is too slow, assigning a dedicated disk to etcd or using faster disk will typically solve the problem. To tell whether a disk is fast enough for etcd, a benchmarking tool such as &lt;a href="https://github.com/axboe/fio" target="_blank" rel="noopener">fio&lt;/a> can be used. Read &lt;a href="https://www.ibm.com/cloud/blog/using-fio-to-tell-whether-your-storage-is-fast-enough-for-etcd" target="_blank" rel="noopener">here&lt;/a> for an example.&lt;/p>
&lt;p>The second most common cause is CPU starvation. If monitoring of the machine’s CPU usage shows heavy utilization, there may not be enough compute capacity for etcd. Moving etcd to dedicated machine, increasing process resource isolation with cgroups, or renicing the etcd server process into a higher priority can usually solve the problem.&lt;/p>
&lt;p>A slow network can also cause this issue. If network metrics among the etcd machines shows long latencies or high drop rate, there may not be enough network capacity for etcd. Moving etcd members to a less congested network will typically solve the problem. However, if the etcd cluster is deployed across data centers, long latency between members is expected. For such deployments, tune the &lt;code>heartbeat-interval&lt;/code> configuration to roughly match the round trip time between the machines, and the &lt;code>election-timeout&lt;/code> configuration to be at least 5 * &lt;code>heartbeat-interval&lt;/code>. See &lt;a href="../tuning/">tuning documentation&lt;/a> for detailed information.&lt;/p>
&lt;p>If none of the above suggestions clear the warnings, please &lt;a href="https://github.com/etcd-io/etcd/issues/new" target="_blank" rel="noopener">open an issue&lt;/a> with detailed logging, monitoring, metrics and optionally workload information.&lt;/p>
&lt;h3 id="what-does-the-etcd-warning-snapshotting-is-taking-more-than-x-seconds-to-finish--mean">What does the etcd warning &amp;ldquo;snapshotting is taking more than x seconds to finish &amp;hellip;&amp;rdquo; mean?&lt;/h3>
&lt;p>etcd sends a snapshot of its complete key-value store to refresh slow followers and for &lt;a href="../op-guide/recovery/#snapshotting-the-keyspace">backups&lt;/a>. Slow snapshot transfer times increase MTTR; if the cluster is ingesting data with high throughput, slow followers may livelock by needing a new snapshot before finishing receiving a snapshot. To catch slow snapshot performance, etcd warns when sending a snapshot takes more than thirty seconds and exceeds the expected transfer time for a 1Gbps connection.&lt;/p></description></item><item><title>Docs: How to migrate etcd from v2 to v3</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-migrate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-migrate/</guid><description>
&lt;p>&lt;code>migrate&lt;/code> to transform etcd v2 to v3 data:&lt;/p>
&lt;p>&lt;img alt="12_etcdctl_migrate_2016061602" src="https://storage.googleapis.com/etcd/demo/12_etcdctl_migrate_2016061602.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># write key in etcd version 2 store&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#000">$ENDPOINT&lt;/span> &lt;span style="color:#204a87">set&lt;/span> foo bar
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># read key in etcd v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> --output&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;json&amp;#34;&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># stop etcd node to migrate, one by one&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># migrate v2 data&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINT&lt;/span> migrate --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;default.etcd&amp;#34;&lt;/span> --wal-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;default.etcd/member/wal&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># restart etcd node after migrate, one by one&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># confirm that the key got migrated&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get /foo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to migrate etcd from v2 to v3</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-migrate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-migrate/</guid><description>
&lt;p>&lt;code>migrate&lt;/code> to transform etcd v2 to v3 data:&lt;/p>
&lt;p>&lt;img alt="12_etcdctl_migrate_2016061602" src="https://storage.googleapis.com/etcd/demo/12_etcdctl_migrate_2016061602.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># write key in etcd version 2 store&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#000">$ENDPOINT&lt;/span> &lt;span style="color:#204a87">set&lt;/span> foo bar
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># read key in etcd v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> --output&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;json&amp;#34;&lt;/span> get foo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># stop etcd node to migrate, one by one&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># migrate v2 data&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINT&lt;/span> migrate --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;default.etcd&amp;#34;&lt;/span> --wal-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;default.etcd/member/wal&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># restart etcd node after migrate, one by one&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># confirm that the key got migrated&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ENDPOINTS&lt;/span> get /foo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to Add and Remove Members</title><link>https://etcd.io/docs/v3.5/tutorials/how-to-deal-with-membership/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/tutorials/how-to-deal-with-membership/</guid><description>
&lt;p>&lt;code>member&lt;/code> to add,remove,update membership:&lt;/p>
&lt;p>&lt;img alt="13_etcdctl_member_2016062301" src="https://storage.googleapis.com/etcd/demo/13_etcdctl_member_2016062301.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For each machine&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>my-etcd-token-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.15
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then replace a member with &lt;code>member remove&lt;/code> and &lt;code>member add&lt;/code> commands:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># get member ID&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.15
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 member list
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># remove the member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">MEMBER_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>278c654c9a6dfd3b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> member remove &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">MEMBER_ID&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># add a new member (node 4)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.16 &lt;span style="color:#8f5902;font-style:italic"># new member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> member add &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --peer-urls&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, start the new member with &lt;code>--initial-cluster-state existing&lt;/code> flag:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># [WARNING] If the new member starts from the same disk space,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># make sure to remove the data directory of the old member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">#&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># restart with &amp;#39;existing&amp;#39; flag&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>my-etcd-token-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>existing
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.16 &lt;span style="color:#8f5902;font-style:italic"># new member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: How to Add and Remove Members</title><link>https://etcd.io/docs/v3.6/tutorials/how-to-deal-with-membership/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/tutorials/how-to-deal-with-membership/</guid><description>
&lt;p>&lt;code>member&lt;/code> to add,remove,update membership:&lt;/p>
&lt;p>&lt;img alt="13_etcdctl_member_2016062301" src="https://storage.googleapis.com/etcd/demo/13_etcdctl_member_2016062301.gif">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For each machine&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>my-etcd-token-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>new
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-3
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.15
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># For node 3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then replace a member with &lt;code>member remove&lt;/code> and &lt;code>member add&lt;/code> commands:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># get member ID&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.15
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 member list
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># remove the member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">MEMBER_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>278c654c9a6dfd3b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_3&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> member remove &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">MEMBER_ID&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># add a new member (node 4)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ETCDCTL_API&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.16 &lt;span style="color:#8f5902;font-style:italic"># new member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcdctl --endpoints&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> member add &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --peer-urls&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, start the new member with &lt;code>--initial-cluster-state existing&lt;/code> flag:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># [WARNING] If the new member starts from the same disk space,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># make sure to remove the data directory of the old member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">#&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># restart with &amp;#39;existing&amp;#39; flag&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>my-etcd-token-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>existing
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-node-4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.14
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>10.240.0.16 &lt;span style="color:#8f5902;font-style:italic"># new member&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_1&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_2&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380,&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">NAME_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">HOST_4&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etcd --data-dir&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>data.etcd --name &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_NAME&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-advertise-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-peer-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2380 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --advertise-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --listen-client-urls http://&lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">THIS_IP&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>:2379 &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-state &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">CLUSTER_STATE&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --initial-cluster-token &lt;span style="color:#4e9a06">${&lt;/span>&lt;span style="color:#000">TOKEN&lt;/span>&lt;span style="color:#4e9a06">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs: Libraries and tools</title><link>https://etcd.io/docs/v3.4/integrations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/integrations/</guid><description>
&lt;p>Note that third-party libraries and tools (not hosted on &lt;a href="https://github.com/etcd-io" target="_blank" rel="noopener">https://github.com/etcd-io&lt;/a>) mentioned below are not tested or maintained by the etcd team. Before using them, users are recommended to read and investigate them.&lt;/p>
&lt;p>&lt;strong>Tools&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/master/etcdctl" target="_blank" rel="noopener">etcdctl&lt;/a> - A command line client for etcd&lt;/li>
&lt;li>&lt;a href="https://npmjs.org/package/etcd-dump" target="_blank" rel="noopener">etcd-dump&lt;/a> - Command line utility for dumping/restoring etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/xetorthio/etcd-fs" target="_blank" rel="noopener">etcd-fs&lt;/a> - FUSE filesystem for etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/rekby/etcddir" target="_blank" rel="noopener">etcddir&lt;/a> - Realtime sync etcd and local directory. Work with windows and linux.&lt;/li>
&lt;li>&lt;a href="https://github.com/henszey/etcd-browser" target="_blank" rel="noopener">etcd-browser&lt;/a> - A web-based key/value editor for etcd using AngularJS&lt;/li>
&lt;li>&lt;a href="https://github.com/datawisesystems/etcd-lock" target="_blank" rel="noopener">etcd-lock&lt;/a> - Master election &amp;amp; distributed r/w lock implementation using etcd - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/matishsiao/etcd-console" target="_blank" rel="noopener">etcd-console&lt;/a> - A web-base key/value editor for etcd using PHP&lt;/li>
&lt;li>&lt;a href="https://github.com/nikfoundas/etcd-viewer" target="_blank" rel="noopener">etcd-viewer&lt;/a> - An etcd key-value store editor/viewer written in Java&lt;/li>
&lt;li>&lt;a href="https://github.com/mickep76/etcdtool" target="_blank" rel="noopener">etcdtool&lt;/a> - Export/Import/Edit etcd directory as JSON/YAML/TOML and Validate directory using JSON schema&lt;/li>
&lt;li>&lt;a href="https://github.com/sinsharat/etcdloadtest" target="_blank" rel="noopener">etcdloadtest&lt;/a> - A command line load test client for etcd version 3.0 and above.&lt;/li>
&lt;li>&lt;a href="https://github.com/ringtail/lucas" target="_blank" rel="noopener">lucas&lt;/a> - A web-based key-value viewer for kubernetes etcd3.0+ cluster.&lt;/li>
&lt;li>&lt;a href="https://etcdmanager.io" target="_blank" rel="noopener">etcd-manager&lt;/a> - A modern, efficient, multi-platform and free etcd 3.x GUI &amp;amp; client tool. Available for Windows, Linux and Mac.&lt;/li>
&lt;li>&lt;a href="https://github.com/gardener/etcd-backup-restore" target="_blank" rel="noopener">etcd-backup-restore&lt;/a> - Utility to periodically and incrementally backup and restore the etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/gardener/etcd-druid" target="_blank" rel="noopener">etcd-druid&lt;/a> - A Kubernetes operator to deploy etcd clusters and manage day-2 operations.&lt;/li>
&lt;li>&lt;a href="https://github.com/kubernetes-sigs/etcdadm" target="_blank" rel="noopener">etcdadm&lt;/a> - A command-line tool for operating an etcd cluster.&lt;/li>
&lt;li>&lt;a href="https://github.com/tsonglew/intellij-etcdhelper" target="_blank" rel="noopener">etcdhelper&lt;/a> - An intellij platform plugin for etcd.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Go libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/main/client/v3" target="_blank" rel="noopener">etcd/client/v3&lt;/a> - the officially maintained Go client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/release-3.4/client/" target="_blank" rel="noopener">etcd/client/v2&lt;/a> - the officially maintained Go client for v2&lt;/li>
&lt;li>&lt;a href="https://github.com/coreos/go-etcd" target="_blank" rel="noopener">go-etcd&lt;/a> - the deprecated official client. May be useful for older (&amp;lt;2.0.0) versions of etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/lumjjb/etcd/tree/enc_wrapper/clientwrap/encwrapper" target="_blank" rel="noopener">encWrapper&lt;/a> - encWrapper is an encryption wrapper for the etcd client Keys API/KV.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Java libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/jetcd" target="_blank" rel="noopener">coreos/jetcd&lt;/a> - Supports v3&lt;/li>
&lt;li>&lt;a href="https://github.com/boonproject/boon/blob/master/etcd/README.md" target="_blank" rel="noopener">boonproject/etcd&lt;/a> - Supports v2, Async/Sync and waits&lt;/li>
&lt;li>&lt;a href="https://github.com/justinsb/jetcd" target="_blank" rel="noopener">justinsb/jetcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/diwakergupta/jetcd" target="_blank" rel="noopener">diwakergupta/jetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jurmous/etcd4j" target="_blank" rel="noopener">jurmous/etcd4j&lt;/a> - Supports v2, Async/Sync, waits and SSL&lt;/li>
&lt;li>&lt;a href="http://github.com/AdoHe/etcd4j" target="_blank" rel="noopener">AdoHe/etcd4j&lt;/a> - Supports v2 (enhance for real production cluster)&lt;/li>
&lt;li>&lt;a href="https://github.com/cdancy/etcd-rest" target="_blank" rel="noopener">cdancy/etcd-rest&lt;/a> - Uses jclouds to provide a complete implementation of v2 API.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Scala libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/maciej/etcd-client" target="_blank" rel="noopener">maciej/etcd-client&lt;/a> - Supports v2. Akka HTTP-based fully async client&lt;/li>
&lt;li>&lt;a href="https://bitbucket.org/eiipii/etcdhttpclient" target="_blank" rel="noopener">eiipii/etcdhttpclient&lt;/a> - Supports v2. Async HTTP client based on Netty and Scala Futures.&lt;/li>
&lt;li>&lt;a href="https://github.com/mingchuno/etcd4s" target="_blank" rel="noopener">mingchuno/etcd4s&lt;/a> - Supports v3 using gRPC with optional Akka Stream support.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Perl libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/hexfusion/perl-net-etcd" target="_blank" rel="noopener">hexfusion/perl-net-etcd&lt;/a> - Supports v3 grpc gateway HTTP API&lt;/li>
&lt;li>&lt;a href="https://github.com/robn/p5-etcd" target="_blank" rel="noopener">robn/p5-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Python libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/kragniz/python-etcd3" target="_blank" rel="noopener">kragniz/python-etcd3&lt;/a> - Client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/jplana/python-etcd" target="_blank" rel="noopener">jplana/python-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/russellhaering/txetcd" target="_blank" rel="noopener">russellhaering/txetcd&lt;/a> - a Twisted Python library&lt;/li>
&lt;li>&lt;a href="https://github.com/cholcombe973/autodock" target="_blank" rel="noopener">cholcombe973/autodock&lt;/a> - A docker deployment automation tool&lt;/li>
&lt;li>&lt;a href="https://github.com/lisael/aioetcd" target="_blank" rel="noopener">lisael/aioetcd&lt;/a> - (Python 3.4+) Asyncio coroutines client (Supports v2)&lt;/li>
&lt;li>&lt;a href="https://github.com/crossbario/txaio-etcd" target="_blank" rel="noopener">txaio-etcd&lt;/a> - Asynchronous etcd v3-only client library for Twisted (today) and asyncio (future)&lt;/li>
&lt;li>&lt;a href="https://github.com/dims/etcd3-gateway" target="_blank" rel="noopener">dims/etcd3-gateway&lt;/a> - etcd v3 API library using the HTTP grpc gateway&lt;/li>
&lt;li>&lt;a href="https://github.com/gaopeiliang/aioetcd3" target="_blank" rel="noopener">aioetcd3&lt;/a> - (Python 3.6+) etcd v3 API for asyncio&lt;/li>
&lt;li>&lt;a href="https://github.com/Revolution1/etcd3-py" target="_blank" rel="noopener">Revolution1/etcd3-py&lt;/a> - (python2.7 and python3.5+) Python client for etcd v3, using gRPC-JSON-Gateway&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Node libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/microsoft/etcd3" target="_blank" rel="noopener">microsoft/etcd3&lt;/a> - Supports v3&lt;/li>
&lt;li>&lt;a href="https://github.com/stianeikeland/node-etcd" target="_blank" rel="noopener">stianeikeland/node-etcd&lt;/a> - Supports v2 (w Coffeescript)&lt;/li>
&lt;li>&lt;a href="https://github.com/lavagetto/nodejs-etcd" target="_blank" rel="noopener">lavagetto/nodejs-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/deedubs/node-etcd-config" target="_blank" rel="noopener">deedubs/node-etcd-config&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Ruby libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/iconara/etcd-rb" target="_blank" rel="noopener">iconara/etcd-rb&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/jpfuentes2/etcd-ruby" target="_blank" rel="noopener">jpfuentes2/etcd-ruby&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ranjib/etcd-ruby" target="_blank" rel="noopener">ranjib/etcd-ruby&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/davissp14/etcdv3-ruby" target="_blank" rel="noopener">davissp14/etcdv3-ruby&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>C libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/apache/celix/tree/master/libs/etcdlib" target="_blank" rel="noopener">apache/celix/etcdlib&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jdarcy/etcd-api" target="_blank" rel="noopener">jdarcy/etcd-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/shafreeck/cetcd" target="_blank" rel="noopener">shafreeck/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>C++ libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/edwardcapriolo/etcdcpp" target="_blank" rel="noopener">edwardcapriolo/etcdcpp&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/suryanathan/etcdcpp" target="_blank" rel="noopener">suryanathan/etcdcpp&lt;/a> - Supports v2 (with waits)&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-api" target="_blank" rel="noopener">nokia/etcd-cpp-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-apiv3" target="_blank" rel="noopener">nokia/etcd-cpp-apiv3&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Clojure libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/aterreno/etcd-clojure" target="_blank" rel="noopener">aterreno/etcd-clojure&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/dwwoelfel/cetcd" target="_blank" rel="noopener">dwwoelfel/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/rthomas/clj-etcd" target="_blank" rel="noopener">rthomas/clj-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Erlang libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/marshall-lee/etcd.erl" target="_blank" rel="noopener">marshall-lee/etcd.erl&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/zhongwencool/eetcd" target="_blank" rel="noopener">zhongwencool/eetcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;h3 id="elixir">Elixir&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/team-telnyx/etcdex" target="_blank" rel="noopener">team-telnyx/etcdex&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>.Net Libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wangjia184/etcdnet" target="_blank" rel="noopener">wangjia184/etcdnet&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/drusellers/etcetera" target="_blank" rel="noopener">drusellers/etcetera&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/shubhamranjan/dotnet-etcd" target="_blank" rel="noopener">shubhamranjan/dotnet-etcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>PHP Libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/linkorb/etcd-php" target="_blank" rel="noopener">linkorb/etcd-php&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/activecollab/etcd" target="_blank" rel="noopener">activecollab/etcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ouqiang/etcd-php" target="_blank" rel="noopener">ouqiang/etcd-php&lt;/a> - Client for v3 gRPC gateway&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Haskell libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wereHamster/etcd-hs" target="_blank" rel="noopener">wereHamster/etcd-hs&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>R libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/ropensci/etseed" target="_blank" rel="noopener">ropensci/etseed&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Nim libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/FedericoCeratto/nim-etcd-client" target="_blank" rel="noopener">etcd_client&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Tcl libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/efrecon/etcd-tcl" target="_blank" rel="noopener">efrecon/etcd-tcl&lt;/a> - Supports v2, except wait.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Rust libraries&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/jimmycuadra/rust-etcd" target="_blank" rel="noopener">jimmycuadra/rust-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Gradle Plugins&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cdancy/gradle-etcd-rest-plugin" target="_blank" rel="noopener">gradle-etcd-rest-plugin&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Chef Integration&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/coderanger/etcd-chef" target="_blank" rel="noopener">coderanger/etcd-chef&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Chef Cookbook&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/spheromak/etcd-cookbook" target="_blank" rel="noopener">spheromak/etcd-cookbook&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>BOSH Releases&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cloudfoundry-community/etcd-boshrelease" target="_blank" rel="noopener">cloudfoundry-community/etcd-boshrelease&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/cloudfoundry/cf-release/tree/master/jobs/etcd" target="_blank" rel="noopener">cloudfoundry/cf-release&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Projects using etcd&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/master/raft#notable-users" target="_blank" rel="noopener">etcd Raft users&lt;/a> - projects using etcd&amp;rsquo;s raft library implementation.&lt;/li>
&lt;li>&lt;a href="https://github.com/apache/celix" target="_blank" rel="noopener">apache/celix&lt;/a> - an implementation of the OSGi specification adapted to C and C++&lt;/li>
&lt;li>&lt;a href="https://github.com/binocarlos/yoda" target="_blank" rel="noopener">binocarlos/yoda&lt;/a> - etcd + ZeroMQ&lt;/li>
&lt;li>&lt;a href="https://github.com/blox/blox" target="_blank" rel="noopener">blox/blox&lt;/a> - a collection of open source projects for container management and orchestration with AWS ECS&lt;/li>
&lt;li>&lt;a href="https://github.com/calavera/active-proxy" target="_blank" rel="noopener">calavera/active-proxy&lt;/a> - HTTP Proxy configured with etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/chain/chain" target="_blank" rel="noopener">chain/chain&lt;/a> - software designed to operate and connect to highly scalable permissioned blockchain networks&lt;/li>
&lt;li>&lt;a href="https://github.com/derekchiang/etcdplus" target="_blank" rel="noopener">derekchiang/etcdplus&lt;/a> - A set of distributed synchronization primitives built upon etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/flynn/go-discover" target="_blank" rel="noopener">go-discover&lt;/a> - service discovery in Go&lt;/li>
&lt;li>&lt;a href="https://github.com/gleicon/goreman/tree/etcd" target="_blank" rel="noopener">gleicon/goreman&lt;/a> - Branch of the Go Foreman clone with etcd support&lt;/li>
&lt;li>&lt;a href="https://github.com/garethr/hiera-etcd" target="_blank" rel="noopener">garethr/hiera-etcd&lt;/a> - Puppet hiera backend using etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcd-vim" target="_blank" rel="noopener">mattn/etcd-vim&lt;/a> - SET and GET keys from inside vim&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcdenv" target="_blank" rel="noopener">mattn/etcdenv&lt;/a> - &amp;ldquo;env&amp;rdquo; shebang with etcd integration&lt;/li>
&lt;li>&lt;a href="https://github.com/kelseyhightower/confd" target="_blank" rel="noopener">kelseyhightower/confd&lt;/a> - Manage local app config files using templates and data from etcd&lt;/li>
&lt;li>&lt;a href="https://git.autistici.org/ai/configdb/tree/master" target="_blank" rel="noopener">configdb&lt;/a> - A REST relational abstraction on top of arbitrary database backends, aimed at storing configs and inventories.&lt;/li>
&lt;li>&lt;a href="https://github.com/kubernetes/kubernetes" target="_blank" rel="noopener">kubernetes/kubernetes&lt;/a> - Container cluster manager introduced by Google.&lt;/li>
&lt;li>&lt;a href="https://github.com/mailgun/vulcand" target="_blank" rel="noopener">mailgun/vulcand&lt;/a> - HTTP proxy that uses etcd as a configuration backend.&lt;/li>
&lt;li>&lt;a href="https://github.com/duedil-ltd/discodns" target="_blank" rel="noopener">duedil-ltd/discodns&lt;/a> - Simple DNS nameserver using etcd as a database for names and records.&lt;/li>
&lt;li>&lt;a href="https://github.com/skynetservices/skydns" target="_blank" rel="noopener">skynetservices/skydns&lt;/a> - RFC compliant DNS server&lt;/li>
&lt;li>&lt;a href="https://github.com/xordataexchange/crypt" target="_blank" rel="noopener">xordataexchange/crypt&lt;/a> - Securely store values in etcd using GPG encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/spf13/viper" target="_blank" rel="noopener">spf13/viper&lt;/a> - Go configuration library, reads values from ENV, pflags, files, and etcd with optional encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/lytics/metafora" target="_blank" rel="noopener">lytics/metafora&lt;/a> - Go distributed task library&lt;/li>
&lt;li>&lt;a href="https://github.com/ryandoyle/nss-etcd" target="_blank" rel="noopener">ryandoyle/nss-etcd&lt;/a> - A GNU libc NSS module for resolving names from etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/dnaeon/gru" target="_blank" rel="noopener">Gru&lt;/a> - Orchestration made easy with Go&lt;/li>
&lt;li>&lt;a href="http://vitess.io/" target="_blank" rel="noopener">Vitess&lt;/a> - Vitess is a database clustering system for horizontal scaling of MySQL.&lt;/li>
&lt;li>&lt;a href="https://github.com/lclarkmichalek/etcdhcp" target="_blank" rel="noopener">lclarkmichalek/etcdhcp&lt;/a> - DHCP server that uses etcd for persistence and coordination.&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/networking-vpp" target="_blank" rel="noopener">openstack/networking-vpp&lt;/a> - A networking driver that programs the &lt;a href="https://wiki.fd.io/view/VPP" target="_blank" rel="noopener">FD.io VPP dataplane&lt;/a> to provide &lt;a href="https://www.openstack.org/" target="_blank" rel="noopener">OpenStack&lt;/a> cloud virtual networking&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/governance/blob/master/reference/base-services.rst" target="_blank" rel="noopener">OpenStack&lt;/a> - OpenStack services can rely on etcd as a base service.&lt;/li>
&lt;li>&lt;a href="https://github.com/coredns/coredns/tree/master/plugin/etcd" target="_blank" rel="noopener">CoreDNS&lt;/a> - CoreDNS is a DNS server that chains plugins, part of CNCF and Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/m3db/m3" target="_blank" rel="noopener">Uber M3&lt;/a> - M3: Uber’s Open Source, Large-scale Metrics Platform for Prometheus&lt;/li>
&lt;li>&lt;a href="https://github.com/rook/rook" target="_blank" rel="noopener">Rook&lt;/a> - Storage Orchestration for Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/zalando/patroni" target="_blank" rel="noopener">Patroni&lt;/a> - A template for PostgreSQL High Availability with ZooKeeper, etcd, or Consul&lt;/li>
&lt;li>&lt;a href="https://github.com/google/trillian" target="_blank" rel="noopener">Trillian&lt;/a> - Trillian implements a Merkle tree whose contents are served from a data storage layer, to allow scalability to extremely large trees.&lt;/li>
&lt;/ul></description></item><item><title>Docs: Libraries and tools</title><link>https://etcd.io/docs/v3.5/integrations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/integrations/</guid><description>
&lt;p>Note that third-party libraries and tools (not hosted on &lt;a href="https://github.com/etcd-io" target="_blank" rel="noopener">https://github.com/etcd-io&lt;/a>) mentioned below are not tested or maintained by the etcd team. Before using them, users are recommended to read and investigate them.&lt;/p>
&lt;h2 id="tools">Tools&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/master/etcdctl" target="_blank" rel="noopener">etcdctl&lt;/a> - A command line client for etcd&lt;/li>
&lt;li>&lt;a href="https://npmjs.org/package/etcd-dump" target="_blank" rel="noopener">etcd-dump&lt;/a> - Command line utility for dumping/restoring etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/xetorthio/etcd-fs" target="_blank" rel="noopener">etcd-fs&lt;/a> - FUSE filesystem for etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/rekby/etcddir" target="_blank" rel="noopener">etcddir&lt;/a> - Realtime sync etcd and local directory. Work with windows and linux.&lt;/li>
&lt;li>&lt;a href="https://github.com/henszey/etcd-browser" target="_blank" rel="noopener">etcd-browser&lt;/a> - A web-based key/value editor for etcd using AngularJS&lt;/li>
&lt;li>&lt;a href="https://github.com/datawisesystems/etcd-lock" target="_blank" rel="noopener">etcd-lock&lt;/a> - Master election &amp;amp; distributed r/w lock implementation using etcd - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/matishsiao/etcd-console" target="_blank" rel="noopener">etcd-console&lt;/a> - A web-base key/value editor for etcd using PHP&lt;/li>
&lt;li>&lt;a href="https://github.com/nikfoundas/etcd-viewer" target="_blank" rel="noopener">etcd-viewer&lt;/a> - An etcd key-value store editor/viewer written in Java&lt;/li>
&lt;li>&lt;a href="https://github.com/mickep76/etcdtool" target="_blank" rel="noopener">etcdtool&lt;/a> - Export/Import/Edit etcd directory as JSON/YAML/TOML and Validate directory using JSON schema&lt;/li>
&lt;li>&lt;a href="https://github.com/sinsharat/etcdloadtest" target="_blank" rel="noopener">etcdloadtest&lt;/a> - A command line load test client for etcd version 3.0 and above.&lt;/li>
&lt;li>&lt;a href="https://github.com/ringtail/lucas" target="_blank" rel="noopener">lucas&lt;/a> - A web-based key-value viewer for kubernetes etcd3.0+ cluster.&lt;/li>
&lt;li>&lt;a href="https://etcdmanager.io" target="_blank" rel="noopener">etcd-manager&lt;/a> - A modern, efficient, multi-platform and free etcd 3.x GUI &amp;amp; client tool. Available for Windows, Linux and Mac.&lt;/li>
&lt;li>&lt;a href="https://github.com/gardener/etcd-backup-restore" target="_blank" rel="noopener">etcd-backup-restore&lt;/a> - Utility to periodically and incrementally backup and restore the etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/gardener/etcd-druid" target="_blank" rel="noopener">etcd-druid&lt;/a> - A Kubernetes operator to deploy etcd clusters and manage day-2 operations.&lt;/li>
&lt;li>&lt;a href="https://github.com/kubernetes-sigs/etcdadm" target="_blank" rel="noopener">etcdadm&lt;/a> - A command-line tool for operating an etcd cluster.&lt;/li>
&lt;li>&lt;a href="https://github.com/ahrtr/etcd-defrag" target="_blank" rel="noopener">etcd-defrag&lt;/a> - An easier to use and smarter etcd defragmentation tool.&lt;/li>
&lt;li>&lt;a href="https://github.com/tsonglew/intellij-etcdhelper" target="_blank" rel="noopener">etcdhelper&lt;/a> - An intellij platform plugin for etcd.&lt;/li>
&lt;/ul>
&lt;h2 id="libraries">Libraries&lt;/h2>
&lt;p>The sections below list etcd client libraries by language.&lt;/p>
&lt;h3 id="go">Go&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/main/client/v3" target="_blank" rel="noopener">etcd/client/v3&lt;/a> - the officially maintained Go client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/release-3.5/client/v2" target="_blank" rel="noopener">etcd/client/v2&lt;/a> - the officially maintained Go client for v2&lt;/li>
&lt;li>&lt;a href="https://github.com/coreos/go-etcd" target="_blank" rel="noopener">go-etcd&lt;/a> - the deprecated official client. May be useful for older (&amp;lt;2.0.0) versions of etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/lumjjb/etcd/tree/enc_wrapper/clientwrap/encwrapper" target="_blank" rel="noopener">encWrapper&lt;/a> - encWrapper is an encryption wrapper for the etcd client Keys API/KV.&lt;/li>
&lt;/ul>
&lt;h3 id="java">Java&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/jetcd" target="_blank" rel="noopener">coreos/jetcd&lt;/a> - Supports v3&lt;/li>
&lt;li>&lt;a href="https://github.com/boonproject/boon/blob/master/etcd/README.md" target="_blank" rel="noopener">boonproject/etcd&lt;/a> - Supports v2, Async/Sync and waits&lt;/li>
&lt;li>&lt;a href="https://github.com/justinsb/jetcd" target="_blank" rel="noopener">justinsb/jetcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/diwakergupta/jetcd" target="_blank" rel="noopener">diwakergupta/jetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jurmous/etcd4j" target="_blank" rel="noopener">jurmous/etcd4j&lt;/a> - Supports v2, Async/Sync, waits and SSL&lt;/li>
&lt;li>&lt;a href="http://github.com/AdoHe/etcd4j" target="_blank" rel="noopener">AdoHe/etcd4j&lt;/a> - Supports v2 (enhance for real production cluster)&lt;/li>
&lt;li>&lt;a href="https://github.com/cdancy/etcd-rest" target="_blank" rel="noopener">cdancy/etcd-rest&lt;/a> - Uses jclouds to provide a complete implementation of v2 API.&lt;/li>
&lt;li>&lt;a href="https://github.com/IBM/etcd-java" target="_blank" rel="noopener">IBM/etcd-java&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="scala">Scala&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/maciej/etcd-client" target="_blank" rel="noopener">maciej/etcd-client&lt;/a> - Supports v2. Akka HTTP-based fully async client&lt;/li>
&lt;li>&lt;a href="https://bitbucket.org/eiipii/etcdhttpclient" target="_blank" rel="noopener">eiipii/etcdhttpclient&lt;/a> - Supports v2. Async HTTP client based on Netty and Scala Futures.&lt;/li>
&lt;li>&lt;a href="https://github.com/mingchuno/etcd4s" target="_blank" rel="noopener">mingchuno/etcd4s&lt;/a> - Supports v3 using gRPC with optional Akka Stream support.&lt;/li>
&lt;/ul>
&lt;h3 id="perl">Perl&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/hexfusion/perl-net-etcd" target="_blank" rel="noopener">hexfusion/perl-net-etcd&lt;/a> - Supports v3 grpc gateway HTTP API&lt;/li>
&lt;li>&lt;a href="https://github.com/robn/p5-etcd" target="_blank" rel="noopener">robn/p5-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="python">Python&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/kragniz/python-etcd3" target="_blank" rel="noopener">kragniz/python-etcd3&lt;/a> - Client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/jplana/python-etcd" target="_blank" rel="noopener">jplana/python-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/russellhaering/txetcd" target="_blank" rel="noopener">russellhaering/txetcd&lt;/a> - a Twisted Python library&lt;/li>
&lt;li>&lt;a href="https://github.com/cholcombe973/autodock" target="_blank" rel="noopener">cholcombe973/autodock&lt;/a> - A docker deployment automation tool&lt;/li>
&lt;li>&lt;a href="https://github.com/lisael/aioetcd" target="_blank" rel="noopener">lisael/aioetcd&lt;/a> - (Python 3.4+) Asyncio coroutines client (Supports v2)&lt;/li>
&lt;li>&lt;a href="https://github.com/crossbario/txaio-etcd" target="_blank" rel="noopener">txaio-etcd&lt;/a> - Asynchronous etcd v3-only client library for Twisted (today) and asyncio (future)&lt;/li>
&lt;li>&lt;a href="https://github.com/gaopeiliang/aioetcd3" target="_blank" rel="noopener">aioetcd3&lt;/a> - (Python 3.6+) etcd v3 API for asyncio&lt;/li>
&lt;li>&lt;a href="https://github.com/Revolution1/etcd3-py" target="_blank" rel="noopener">Revolution1/etcd3-py&lt;/a> - (python2.7 and python3.5+) Python client for etcd v3, using gRPC-JSON-Gateway&lt;/li>
&lt;/ul>
&lt;h3 id="node">Node&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/mixer/etcd3" target="_blank" rel="noopener">mixer/etcd3&lt;/a> - Supports v3&lt;/li>
&lt;li>&lt;a href="https://github.com/stianeikeland/node-etcd" target="_blank" rel="noopener">stianeikeland/node-etcd&lt;/a> - Supports v2 (w Coffeescript)&lt;/li>
&lt;li>&lt;a href="https://github.com/lavagetto/nodejs-etcd" target="_blank" rel="noopener">lavagetto/nodejs-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/deedubs/node-etcd-config" target="_blank" rel="noopener">deedubs/node-etcd-config&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="ruby">Ruby&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/iconara/etcd-rb" target="_blank" rel="noopener">iconara/etcd-rb&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/jpfuentes2/etcd-ruby" target="_blank" rel="noopener">jpfuentes2/etcd-ruby&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ranjib/etcd-ruby" target="_blank" rel="noopener">ranjib/etcd-ruby&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/davissp14/etcdv3-ruby" target="_blank" rel="noopener">davissp14/etcdv3-ruby&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;h3 id="c">C&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/apache/celix/tree/master/libs/etcdlib" target="_blank" rel="noopener">apache/celix/etcdlib&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jdarcy/etcd-api" target="_blank" rel="noopener">jdarcy/etcd-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/shafreeck/cetcd" target="_blank" rel="noopener">shafreeck/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="c-1">C++&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/edwardcapriolo/etcdcpp" target="_blank" rel="noopener">edwardcapriolo/etcdcpp&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/suryanathan/etcdcpp" target="_blank" rel="noopener">suryanathan/etcdcpp&lt;/a> - Supports v2 (with waits)&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-api" target="_blank" rel="noopener">nokia/etcd-cpp-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-apiv3" target="_blank" rel="noopener">nokia/etcd-cpp-apiv3&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;h3 id="clojure">Clojure&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/aterreno/etcd-clojure" target="_blank" rel="noopener">aterreno/etcd-clojure&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/dwwoelfel/cetcd" target="_blank" rel="noopener">dwwoelfel/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/rthomas/clj-etcd" target="_blank" rel="noopener">rthomas/clj-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="erlang">Erlang&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/marshall-lee/etcd.erl" target="_blank" rel="noopener">marshall-lee/etcd.erl&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/zhongwencool/eetcd" target="_blank" rel="noopener">zhongwencool/eetcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;h3 id="elixir">Elixir&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/team-telnyx/etcdex" target="_blank" rel="noopener">team-telnyx/etcdex&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;h3 id="net">.NET&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wangjia184/etcdnet" target="_blank" rel="noopener">wangjia184/etcdnet&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/drusellers/etcetera" target="_blank" rel="noopener">drusellers/etcetera&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/shubhamranjan/dotnet-etcd" target="_blank" rel="noopener">shubhamranjan/dotnet-etcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;h3 id="php">PHP&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/linkorb/etcd-php" target="_blank" rel="noopener">linkorb/etcd-php&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/activecollab/etcd" target="_blank" rel="noopener">activecollab/etcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ouqiang/etcd-php" target="_blank" rel="noopener">ouqiang/etcd-php&lt;/a> - Client for v3 gRPC gateway&lt;/li>
&lt;/ul>
&lt;h3 id="haskell">Haskell&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wereHamster/etcd-hs" target="_blank" rel="noopener">wereHamster/etcd-hs&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="r">R&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/ropensci/etseed" target="_blank" rel="noopener">ropensci/etseed&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="nim">Nim&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/FedericoCeratto/nim-etcd-client" target="_blank" rel="noopener">etcd_client&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="tcl">Tcl&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/efrecon/etcd-tcl" target="_blank" rel="noopener">efrecon/etcd-tcl&lt;/a> - Supports v2, except wait.&lt;/li>
&lt;/ul>
&lt;h3 id="rust">Rust&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/jimmycuadra/rust-etcd" target="_blank" rel="noopener">jimmycuadra/rust-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="gradle">Gradle&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cdancy/gradle-etcd-rest-plugin" target="_blank" rel="noopener">gradle-etcd-rest-plugin&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="lua">Lua&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/api7/lua-resty-etcd" target="_blank" rel="noopener">api7/lua-resty-etcd&lt;/a> - Supports v2 and v3 (grpc gateway HTTP API)&lt;/li>
&lt;/ul>
&lt;h2 id="deployment-tools">Deployment tools&lt;/h2>
&lt;h3 id="chef-integrations">Chef integrations&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/coderanger/etcd-chef" target="_blank" rel="noopener">coderanger/etcd-chef&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="chef-cookbooks">Chef cookbooks&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/spheromak/etcd-cookbook" target="_blank" rel="noopener">spheromak/etcd-cookbook&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="bosh-releases">BOSH releases&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cloudfoundry-community/etcd-boshrelease" target="_blank" rel="noopener">cloudfoundry-community/etcd-boshrelease&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/cloudfoundry/cf-release/tree/master/jobs/etcd" target="_blank" rel="noopener">cloudfoundry/cf-release&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="projects-using-etcd">Projects using etcd&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/blob/master/raft/README.md#notable-users" target="_blank" rel="noopener">etcd Raft users&lt;/a> - projects using etcd&amp;rsquo;s raft library implementation.&lt;/li>
&lt;li>&lt;a href="https://github.com/apache/celix" target="_blank" rel="noopener">apache/celix&lt;/a> - an implementation of the OSGi specification adapted to C and C++&lt;/li>
&lt;li>&lt;a href="https://github.com/binocarlos/yoda" target="_blank" rel="noopener">binocarlos/yoda&lt;/a> - etcd + ZeroMQ&lt;/li>
&lt;li>&lt;a href="https://github.com/blox/blox" target="_blank" rel="noopener">blox/blox&lt;/a> - a collection of open source projects for container management and orchestration with AWS ECS&lt;/li>
&lt;li>&lt;a href="https://github.com/calavera/active-proxy" target="_blank" rel="noopener">calavera/active-proxy&lt;/a> - HTTP Proxy configured with etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/chain/chain" target="_blank" rel="noopener">chain/chain&lt;/a> - software designed to operate and connect to highly scalable permissioned blockchain networks&lt;/li>
&lt;li>&lt;a href="https://github.com/derekchiang/etcdplus" target="_blank" rel="noopener">derekchiang/etcdplus&lt;/a> - A set of distributed synchronization primitives built upon etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/flynn/go-discover" target="_blank" rel="noopener">go-discover&lt;/a> - service discovery in Go&lt;/li>
&lt;li>&lt;a href="https://github.com/gleicon/goreman/tree/etcd" target="_blank" rel="noopener">gleicon/goreman&lt;/a> - Branch of the Go Foreman clone with etcd support&lt;/li>
&lt;li>&lt;a href="https://github.com/garethr/hiera-etcd" target="_blank" rel="noopener">garethr/hiera-etcd&lt;/a> - Puppet hiera backend using etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcd-vim" target="_blank" rel="noopener">mattn/etcd-vim&lt;/a> - SET and GET keys from inside vim&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcdenv" target="_blank" rel="noopener">mattn/etcdenv&lt;/a> - &amp;ldquo;env&amp;rdquo; shebang with etcd integration&lt;/li>
&lt;li>&lt;a href="https://github.com/kelseyhightower/confd" target="_blank" rel="noopener">kelseyhightower/confd&lt;/a> - Manage local app config files using templates and data from etcd&lt;/li>
&lt;li>&lt;a href="https://git.autistici.org/ai/configdb/tree/master" target="_blank" rel="noopener">configdb&lt;/a> - A REST relational abstraction on top of arbitrary database backends, aimed at storing configs and inventories.&lt;/li>
&lt;li>&lt;a href="https://github.com/kubernetes/kubernetes" target="_blank" rel="noopener">kubernetes/kubernetes&lt;/a> - Container cluster manager introduced by Google.&lt;/li>
&lt;li>&lt;a href="https://github.com/mailgun/vulcand" target="_blank" rel="noopener">mailgun/vulcand&lt;/a> - HTTP proxy that uses etcd as a configuration backend.&lt;/li>
&lt;li>&lt;a href="https://github.com/duedil-ltd/discodns" target="_blank" rel="noopener">duedil-ltd/discodns&lt;/a> - Simple DNS nameserver using etcd as a database for names and records.&lt;/li>
&lt;li>&lt;a href="https://github.com/skynetservices/skydns" target="_blank" rel="noopener">skynetservices/skydns&lt;/a> - RFC compliant DNS server&lt;/li>
&lt;li>&lt;a href="https://github.com/xordataexchange/crypt" target="_blank" rel="noopener">xordataexchange/crypt&lt;/a> - Securely store values in etcd using GPG encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/spf13/viper" target="_blank" rel="noopener">spf13/viper&lt;/a> - Go configuration library, reads values from ENV, pflags, files, and etcd with optional encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/lytics/metafora" target="_blank" rel="noopener">lytics/metafora&lt;/a> - Go distributed task library&lt;/li>
&lt;li>&lt;a href="https://github.com/ryandoyle/nss-etcd" target="_blank" rel="noopener">ryandoyle/nss-etcd&lt;/a> - A GNU libc NSS module for resolving names from etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/dnaeon/gru" target="_blank" rel="noopener">Gru&lt;/a> - Orchestration made easy with Go&lt;/li>
&lt;li>&lt;a href="http://vitess.io/" target="_blank" rel="noopener">Vitess&lt;/a> - Vitess is a database clustering system for horizontal scaling of MySQL.&lt;/li>
&lt;li>&lt;a href="https://github.com/lclarkmichalek/etcdhcp" target="_blank" rel="noopener">lclarkmichalek/etcdhcp&lt;/a> - DHCP server that uses etcd for persistence and coordination.&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/networking-vpp" target="_blank" rel="noopener">openstack/networking-vpp&lt;/a> - A networking driver that programs the &lt;a href="https://wiki.fd.io/view/VPP" target="_blank" rel="noopener">FD.io VPP dataplane&lt;/a> to provide &lt;a href="https://www.openstack.org/" target="_blank" rel="noopener">OpenStack&lt;/a> cloud virtual networking&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/governance/blob/master/reference/base-services.rst" target="_blank" rel="noopener">OpenStack&lt;/a> - OpenStack services can rely on etcd as a base service.&lt;/li>
&lt;li>&lt;a href="https://github.com/coredns/coredns/tree/master/plugin/etcd" target="_blank" rel="noopener">CoreDNS&lt;/a> - CoreDNS is a DNS server that chains plugins, part of CNCF and Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/m3db/m3" target="_blank" rel="noopener">Uber M3&lt;/a> - M3: Uber’s Open Source, Large-scale Metrics Platform for Prometheus&lt;/li>
&lt;li>&lt;a href="https://github.com/rook/rook" target="_blank" rel="noopener">Rook&lt;/a> - Storage Orchestration for Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/zalando/patroni" target="_blank" rel="noopener">Patroni&lt;/a> - A template for PostgreSQL High Availability with ZooKeeper, etcd, or Consul&lt;/li>
&lt;li>&lt;a href="https://github.com/google/trillian" target="_blank" rel="noopener">Trillian&lt;/a> - Trillian implements a Merkle tree whose contents are served from a data storage layer, to allow scalability to extremely large trees.&lt;/li>
&lt;li>&lt;a href="https://github.com/apache/apisix" target="_blank" rel="noopener">Apache APISIX&lt;/a> - Apache APISIX is a dynamic, real-time, high-performance API gateway.&lt;/li>
&lt;li>&lt;a href="https://github.com/purpleidea/mgmt" target="_blank" rel="noopener">purpleidea/mgmt&lt;/a> - Next generation distributed, event-driven, parallel config management!&lt;/li>
&lt;li>&lt;a href="https://docs.portworx.com/concepts/internal-kvdb/" target="_blank" rel="noopener">Portworx/kvdb&lt;/a> - The internal kvdb for storing Portworx cluster configuration.&lt;/li>
&lt;li>&lt;a href="https://pulsar.apache.org/" target="_blank" rel="noopener">Apache Pulsar&lt;/a> - Apache Pulsar is an open-source, distributed messaging and streaming platform built for the cloud.&lt;/li>
&lt;/ul></description></item><item><title>Docs: Libraries and tools</title><link>https://etcd.io/docs/v3.6/integrations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/integrations/</guid><description>
&lt;p>Note that third-party libraries and tools (not hosted on &lt;a href="https://github.com/etcd-io" target="_blank" rel="noopener">https://github.com/etcd-io&lt;/a>) mentioned below are not tested or maintained by the etcd team. Before using them, users are recommended to read and investigate them.&lt;/p>
&lt;h2 id="tools">Tools&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/main/etcdctl" target="_blank" rel="noopener">etcdctl&lt;/a> - A command line client for etcd&lt;/li>
&lt;li>&lt;a href="https://npmjs.org/package/etcd-dump" target="_blank" rel="noopener">etcd-dump&lt;/a> - Command line utility for dumping/restoring etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/xetorthio/etcd-fs" target="_blank" rel="noopener">etcd-fs&lt;/a> - FUSE filesystem for etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/rekby/etcddir" target="_blank" rel="noopener">etcddir&lt;/a> - Realtime sync etcd and local directory. Work with windows and linux.&lt;/li>
&lt;li>&lt;a href="https://github.com/henszey/etcd-browser" target="_blank" rel="noopener">etcd-browser&lt;/a> - A web-based key/value editor for etcd using AngularJS&lt;/li>
&lt;li>&lt;a href="https://github.com/datawisesystems/etcd-lock" target="_blank" rel="noopener">etcd-lock&lt;/a> - Master election &amp;amp; distributed r/w lock implementation using etcd - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/matishsiao/etcd-console" target="_blank" rel="noopener">etcd-console&lt;/a> - A web-base key/value editor for etcd using PHP&lt;/li>
&lt;li>&lt;a href="https://github.com/nikfoundas/etcd-viewer" target="_blank" rel="noopener">etcd-viewer&lt;/a> - An etcd key-value store editor/viewer written in Java&lt;/li>
&lt;li>&lt;a href="https://github.com/mickep76/etcdtool" target="_blank" rel="noopener">etcdtool&lt;/a> - Export/Import/Edit etcd directory as JSON/YAML/TOML and Validate directory using JSON schema&lt;/li>
&lt;li>&lt;a href="https://github.com/sinsharat/etcdloadtest" target="_blank" rel="noopener">etcdloadtest&lt;/a> - A command line load test client for etcd version 3.0 and above.&lt;/li>
&lt;li>&lt;a href="https://github.com/ringtail/lucas" target="_blank" rel="noopener">lucas&lt;/a> - A web-based key-value viewer for kubernetes etcd3.0+ cluster.&lt;/li>
&lt;li>&lt;a href="https://etcdmanager.io" target="_blank" rel="noopener">etcd-manager&lt;/a> - A modern, efficient, multi-platform and free etcd 3.x GUI &amp;amp; client tool. Available for Windows, Linux and Mac.&lt;/li>
&lt;li>&lt;a href="https://github.com/gardener/etcd-backup-restore" target="_blank" rel="noopener">etcd-backup-restore&lt;/a> - Utility to periodically and incrementally backup and restore the etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/gardener/etcd-druid" target="_blank" rel="noopener">etcd-druid&lt;/a> - A Kubernetes operator to deploy etcd clusters and manage day-2 operations.&lt;/li>
&lt;li>&lt;a href="https://github.com/kubernetes-sigs/etcdadm" target="_blank" rel="noopener">etcdadm&lt;/a> - A command-line tool for operating an etcd cluster.&lt;/li>
&lt;li>&lt;a href="https://github.com/ahrtr/etcd-defrag" target="_blank" rel="noopener">etcd-defrag&lt;/a> - An easier to use and smarter etcd defragmentation tool.&lt;/li>
&lt;li>&lt;a href="https://github.com/tsonglew/intellij-etcdhelper" target="_blank" rel="noopener">etcdhelper&lt;/a> - An intellij platform plugin for etcd.&lt;/li>
&lt;/ul>
&lt;h2 id="libraries">Libraries&lt;/h2>
&lt;p>The sections below list etcd client libraries by language.&lt;/p>
&lt;h3 id="go">Go&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/etcd/tree/main/client/v3" target="_blank" rel="noopener">etcd/client/v3&lt;/a> - the officially maintained Go client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/coreos/go-etcd" target="_blank" rel="noopener">go-etcd&lt;/a> - the deprecated official client. May be useful for older (&amp;lt;2.0.0) versions of etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/lumjjb/etcd/tree/enc_wrapper/clientwrap/encwrapper" target="_blank" rel="noopener">encWrapper&lt;/a> - encWrapper is an encryption wrapper for the etcd client Keys API/KV.&lt;/li>
&lt;/ul>
&lt;h3 id="java">Java&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/jetcd" target="_blank" rel="noopener">coreos/jetcd&lt;/a> - Supports v3&lt;/li>
&lt;li>&lt;a href="https://github.com/boonproject/boon/blob/master/etcd/README.md" target="_blank" rel="noopener">boonproject/etcd&lt;/a> - Supports v2, Async/Sync and waits&lt;/li>
&lt;li>&lt;a href="https://github.com/justinsb/jetcd" target="_blank" rel="noopener">justinsb/jetcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/diwakergupta/jetcd" target="_blank" rel="noopener">diwakergupta/jetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jurmous/etcd4j" target="_blank" rel="noopener">jurmous/etcd4j&lt;/a> - Supports v2, Async/Sync, waits and SSL&lt;/li>
&lt;li>&lt;a href="http://github.com/AdoHe/etcd4j" target="_blank" rel="noopener">AdoHe/etcd4j&lt;/a> - Supports v2 (enhance for real production cluster)&lt;/li>
&lt;li>&lt;a href="https://github.com/cdancy/etcd-rest" target="_blank" rel="noopener">cdancy/etcd-rest&lt;/a> - Uses jclouds to provide a complete implementation of v2 API.&lt;/li>
&lt;li>&lt;a href="https://github.com/IBM/etcd-java" target="_blank" rel="noopener">IBM/etcd-java&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="scala">Scala&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/maciej/etcd-client" target="_blank" rel="noopener">maciej/etcd-client&lt;/a> - Supports v2. Akka HTTP-based fully async client&lt;/li>
&lt;li>&lt;a href="https://bitbucket.org/eiipii/etcdhttpclient" target="_blank" rel="noopener">eiipii/etcdhttpclient&lt;/a> - Supports v2. Async HTTP client based on Netty and Scala Futures.&lt;/li>
&lt;li>&lt;a href="https://github.com/mingchuno/etcd4s" target="_blank" rel="noopener">mingchuno/etcd4s&lt;/a> - Supports v3 using gRPC with optional Akka Stream support.&lt;/li>
&lt;/ul>
&lt;h3 id="perl">Perl&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/hexfusion/perl-net-etcd" target="_blank" rel="noopener">hexfusion/perl-net-etcd&lt;/a> - Supports v3 grpc gateway HTTP API&lt;/li>
&lt;li>&lt;a href="https://github.com/robn/p5-etcd" target="_blank" rel="noopener">robn/p5-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="python">Python&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/kragniz/python-etcd3" target="_blank" rel="noopener">kragniz/python-etcd3&lt;/a> - Client for v3&lt;/li>
&lt;li>&lt;a href="https://github.com/jplana/python-etcd" target="_blank" rel="noopener">jplana/python-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/russellhaering/txetcd" target="_blank" rel="noopener">russellhaering/txetcd&lt;/a> - a Twisted Python library&lt;/li>
&lt;li>&lt;a href="https://github.com/cholcombe973/autodock" target="_blank" rel="noopener">cholcombe973/autodock&lt;/a> - A docker deployment automation tool&lt;/li>
&lt;li>&lt;a href="https://github.com/lisael/aioetcd" target="_blank" rel="noopener">lisael/aioetcd&lt;/a> - (Python 3.4+) Asyncio coroutines client (Supports v2)&lt;/li>
&lt;li>&lt;a href="https://github.com/crossbario/txaio-etcd" target="_blank" rel="noopener">txaio-etcd&lt;/a> - Asynchronous etcd v3-only client library for Twisted (today) and asyncio (future)&lt;/li>
&lt;li>&lt;a href="https://github.com/dims/etcd3-gateway" target="_blank" rel="noopener">dims/etcd3-gateway&lt;/a> - etcd v3 API library using the HTTP grpc gateway&lt;/li>
&lt;li>&lt;a href="https://github.com/gaopeiliang/aioetcd3" target="_blank" rel="noopener">aioetcd3&lt;/a> - (Python 3.6+) etcd v3 API for asyncio&lt;/li>
&lt;li>&lt;a href="https://github.com/Revolution1/etcd3-py" target="_blank" rel="noopener">Revolution1/etcd3-py&lt;/a> - (python2.7 and python3.5+) Python client for etcd v3, using gRPC-JSON-Gateway&lt;/li>
&lt;/ul>
&lt;h3 id="node">Node&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/mixer/etcd3" target="_blank" rel="noopener">mixer/etcd3&lt;/a> - Supports v3&lt;/li>
&lt;li>&lt;a href="https://github.com/stianeikeland/node-etcd" target="_blank" rel="noopener">stianeikeland/node-etcd&lt;/a> - Supports v2 (w Coffeescript)&lt;/li>
&lt;li>&lt;a href="https://github.com/lavagetto/nodejs-etcd" target="_blank" rel="noopener">lavagetto/nodejs-etcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/deedubs/node-etcd-config" target="_blank" rel="noopener">deedubs/node-etcd-config&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="ruby">Ruby&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/iconara/etcd-rb" target="_blank" rel="noopener">iconara/etcd-rb&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/jpfuentes2/etcd-ruby" target="_blank" rel="noopener">jpfuentes2/etcd-ruby&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ranjib/etcd-ruby" target="_blank" rel="noopener">ranjib/etcd-ruby&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/davissp14/etcdv3-ruby" target="_blank" rel="noopener">davissp14/etcdv3-ruby&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;h3 id="c">C&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/apache/celix/tree/master/libs/etcdlib" target="_blank" rel="noopener">apache/celix/etcdlib&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/jdarcy/etcd-api" target="_blank" rel="noopener">jdarcy/etcd-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/shafreeck/cetcd" target="_blank" rel="noopener">shafreeck/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="c-1">C++&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/edwardcapriolo/etcdcpp" target="_blank" rel="noopener">edwardcapriolo/etcdcpp&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/suryanathan/etcdcpp" target="_blank" rel="noopener">suryanathan/etcdcpp&lt;/a> - Supports v2 (with waits)&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-api" target="_blank" rel="noopener">nokia/etcd-cpp-api&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/nokia/etcd-cpp-apiv3" target="_blank" rel="noopener">nokia/etcd-cpp-apiv3&lt;/a> - Supports v3&lt;/li>
&lt;/ul>
&lt;h3 id="clojure">Clojure&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/aterreno/etcd-clojure" target="_blank" rel="noopener">aterreno/etcd-clojure&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/dwwoelfel/cetcd" target="_blank" rel="noopener">dwwoelfel/cetcd&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/rthomas/clj-etcd" target="_blank" rel="noopener">rthomas/clj-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="erlang">Erlang&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/marshall-lee/etcd.erl" target="_blank" rel="noopener">marshall-lee/etcd.erl&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/zhongwencool/eetcd" target="_blank" rel="noopener">zhongwencool/eetcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;h3 id="elixir">Elixir&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/team-telnyx/etcdex" target="_blank" rel="noopener">team-telnyx/etcdex&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;h3 id="net">.NET&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wangjia184/etcdnet" target="_blank" rel="noopener">wangjia184/etcdnet&lt;/a> - Supports v2&lt;/li>
&lt;li>&lt;a href="https://github.com/drusellers/etcetera" target="_blank" rel="noopener">drusellers/etcetera&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/shubhamranjan/dotnet-etcd" target="_blank" rel="noopener">shubhamranjan/dotnet-etcd&lt;/a> - Supports v3+ (GRPC only)&lt;/li>
&lt;/ul>
&lt;h3 id="php">PHP&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/linkorb/etcd-php" target="_blank" rel="noopener">linkorb/etcd-php&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/activecollab/etcd" target="_blank" rel="noopener">activecollab/etcd&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ouqiang/etcd-php" target="_blank" rel="noopener">ouqiang/etcd-php&lt;/a> - Client for v3 gRPC gateway&lt;/li>
&lt;/ul>
&lt;h3 id="haskell">Haskell&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/wereHamster/etcd-hs" target="_blank" rel="noopener">wereHamster/etcd-hs&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="r">R&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/ropensci/etseed" target="_blank" rel="noopener">ropensci/etseed&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="nim">Nim&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/FedericoCeratto/nim-etcd-client" target="_blank" rel="noopener">etcd_client&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="tcl">Tcl&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/efrecon/etcd-tcl" target="_blank" rel="noopener">efrecon/etcd-tcl&lt;/a> - Supports v2, except wait.&lt;/li>
&lt;/ul>
&lt;h3 id="rust">Rust&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/jimmycuadra/rust-etcd" target="_blank" rel="noopener">jimmycuadra/rust-etcd&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="gradle">Gradle&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cdancy/gradle-etcd-rest-plugin" target="_blank" rel="noopener">gradle-etcd-rest-plugin&lt;/a> - Supports v2&lt;/li>
&lt;/ul>
&lt;h3 id="lua">Lua&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/api7/lua-resty-etcd" target="_blank" rel="noopener">api7/lua-resty-etcd&lt;/a> - Supports v2 and v3 (grpc gateway HTTP API)&lt;/li>
&lt;/ul>
&lt;h2 id="deployment-tools">Deployment tools&lt;/h2>
&lt;h3 id="chef-integrations">Chef integrations&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/coderanger/etcd-chef" target="_blank" rel="noopener">coderanger/etcd-chef&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="chef-cookbooks">Chef cookbooks&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/spheromak/etcd-cookbook" target="_blank" rel="noopener">spheromak/etcd-cookbook&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="bosh-releases">BOSH releases&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cloudfoundry-community/etcd-boshrelease" target="_blank" rel="noopener">cloudfoundry-community/etcd-boshrelease&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/cloudfoundry/cf-release/tree/master/jobs/etcd" target="_blank" rel="noopener">cloudfoundry/cf-release&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="projects-using-etcd">Projects using etcd&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/etcd-io/raft/blob/main/README.md#notable-users" target="_blank" rel="noopener">etcd Raft users&lt;/a> - projects using etcd&amp;rsquo;s raft library implementation.&lt;/li>
&lt;li>&lt;a href="https://github.com/apache/apisix" target="_blank" rel="noopener">apache/apisix&lt;/a> - A dynamic, real-time, high-performance API gateway&lt;/li>
&lt;li>&lt;a href="https://github.com/apache/celix" target="_blank" rel="noopener">apache/celix&lt;/a> - an implementation of the OSGi specification adapted to C and C++&lt;/li>
&lt;li>&lt;a href="https://github.com/binocarlos/yoda" target="_blank" rel="noopener">binocarlos/yoda&lt;/a> - etcd + ZeroMQ&lt;/li>
&lt;li>&lt;a href="https://github.com/blox/blox" target="_blank" rel="noopener">blox/blox&lt;/a> - a collection of open source projects for container management and orchestration with AWS ECS&lt;/li>
&lt;li>&lt;a href="https://github.com/calavera/active-proxy" target="_blank" rel="noopener">calavera/active-proxy&lt;/a> - HTTP Proxy configured with etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/chain/chain" target="_blank" rel="noopener">chain/chain&lt;/a> - software designed to operate and connect to highly scalable permissioned blockchain networks&lt;/li>
&lt;li>&lt;a href="https://github.com/derekchiang/etcdplus" target="_blank" rel="noopener">derekchiang/etcdplus&lt;/a> - A set of distributed synchronization primitives built upon etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/flynn/go-discover" target="_blank" rel="noopener">go-discover&lt;/a> - service discovery in Go&lt;/li>
&lt;li>&lt;a href="https://github.com/gleicon/goreman/tree/etcd" target="_blank" rel="noopener">gleicon/goreman&lt;/a> - Branch of the Go Foreman clone with etcd support&lt;/li>
&lt;li>&lt;a href="https://github.com/garethr/hiera-etcd" target="_blank" rel="noopener">garethr/hiera-etcd&lt;/a> - Puppet hiera backend using etcd&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcd-vim" target="_blank" rel="noopener">mattn/etcd-vim&lt;/a> - SET and GET keys from inside vim&lt;/li>
&lt;li>&lt;a href="https://github.com/mattn/etcdenv" target="_blank" rel="noopener">mattn/etcdenv&lt;/a> - &amp;ldquo;env&amp;rdquo; shebang with etcd integration&lt;/li>
&lt;li>&lt;a href="https://github.com/kelseyhightower/confd" target="_blank" rel="noopener">kelseyhightower/confd&lt;/a> - Manage local app config files using templates and data from etcd&lt;/li>
&lt;li>&lt;a href="https://git.autistici.org/ai/configdb/tree/master" target="_blank" rel="noopener">configdb&lt;/a> - A REST relational abstraction on top of arbitrary database backends, aimed at storing configs and inventories.&lt;/li>
&lt;li>&lt;a href="https://github.com/kubernetes/kubernetes" target="_blank" rel="noopener">kubernetes/kubernetes&lt;/a> - Container cluster manager introduced by Google.&lt;/li>
&lt;li>&lt;a href="https://github.com/mailgun/vulcand" target="_blank" rel="noopener">mailgun/vulcand&lt;/a> - HTTP proxy that uses etcd as a configuration backend.&lt;/li>
&lt;li>&lt;a href="https://github.com/duedil-ltd/discodns" target="_blank" rel="noopener">duedil-ltd/discodns&lt;/a> - Simple DNS nameserver using etcd as a database for names and records.&lt;/li>
&lt;li>&lt;a href="https://github.com/skynetservices/skydns" target="_blank" rel="noopener">skynetservices/skydns&lt;/a> - RFC compliant DNS server&lt;/li>
&lt;li>&lt;a href="https://github.com/xordataexchange/crypt" target="_blank" rel="noopener">xordataexchange/crypt&lt;/a> - Securely store values in etcd using GPG encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/spf13/viper" target="_blank" rel="noopener">spf13/viper&lt;/a> - Go configuration library, reads values from ENV, pflags, files, and etcd with optional encryption&lt;/li>
&lt;li>&lt;a href="https://github.com/lytics/metafora" target="_blank" rel="noopener">lytics/metafora&lt;/a> - Go distributed task library&lt;/li>
&lt;li>&lt;a href="https://github.com/ryandoyle/nss-etcd" target="_blank" rel="noopener">ryandoyle/nss-etcd&lt;/a> - A GNU libc NSS module for resolving names from etcd.&lt;/li>
&lt;li>&lt;a href="https://github.com/dnaeon/gru" target="_blank" rel="noopener">Gru&lt;/a> - Orchestration made easy with Go&lt;/li>
&lt;li>&lt;a href="http://vitess.io/" target="_blank" rel="noopener">Vitess&lt;/a> - Vitess is a database clustering system for horizontal scaling of MySQL.&lt;/li>
&lt;li>&lt;a href="https://github.com/lclarkmichalek/etcdhcp" target="_blank" rel="noopener">lclarkmichalek/etcdhcp&lt;/a> - DHCP server that uses etcd for persistence and coordination.&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/networking-vpp" target="_blank" rel="noopener">openstack/networking-vpp&lt;/a> - A networking driver that programs the &lt;a href="https://wiki.fd.io/view/VPP" target="_blank" rel="noopener">FD.io VPP dataplane&lt;/a> to provide &lt;a href="https://www.openstack.org/" target="_blank" rel="noopener">OpenStack&lt;/a> cloud virtual networking&lt;/li>
&lt;li>&lt;a href="https://github.com/openstack/governance/blob/master/reference/base-services.rst" target="_blank" rel="noopener">OpenStack&lt;/a> - OpenStack services can rely on etcd as a base service.&lt;/li>
&lt;li>&lt;a href="https://github.com/coredns/coredns/tree/master/plugin/etcd" target="_blank" rel="noopener">CoreDNS&lt;/a> - CoreDNS is a DNS server that chains plugins, part of CNCF and Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/m3db/m3" target="_blank" rel="noopener">Uber M3&lt;/a> - M3: Uber’s Open Source, Large-scale Metrics Platform for Prometheus&lt;/li>
&lt;li>&lt;a href="https://github.com/rook/rook" target="_blank" rel="noopener">Rook&lt;/a> - Storage Orchestration for Kubernetes&lt;/li>
&lt;li>&lt;a href="https://github.com/zalando/patroni" target="_blank" rel="noopener">Patroni&lt;/a> - A template for PostgreSQL High Availability with ZooKeeper, etcd, or Consul&lt;/li>
&lt;li>&lt;a href="https://github.com/google/trillian" target="_blank" rel="noopener">Trillian&lt;/a> - Trillian implements a Merkle tree whose contents are served from a data storage layer, to allow scalability to extremely large trees.&lt;/li>
&lt;li>&lt;a href="https://github.com/apache/apisix" target="_blank" rel="noopener">Apache APISIX&lt;/a> - Apache APISIX is a dynamic, real-time, high-performance API gateway.&lt;/li>
&lt;li>&lt;a href="https://github.com/purpleidea/mgmt" target="_blank" rel="noopener">purpleidea/mgmt&lt;/a> - Next generation distributed, event-driven, parallel config management!&lt;/li>
&lt;li>&lt;a href="https://docs.portworx.com/concepts/internal-kvdb/" target="_blank" rel="noopener">Portworx/kvdb&lt;/a> - The internal kvdb for storing Portworx cluster configuration.&lt;/li>
&lt;li>&lt;a href="https://pulsar.apache.org/" target="_blank" rel="noopener">Apache Pulsar&lt;/a> - Apache Pulsar is an open-source, distributed messaging and streaming platform built for the cloud.&lt;/li>
&lt;/ul></description></item><item><title>Docs: Metrics</title><link>https://etcd.io/docs/v3.4/metrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/metrics/</guid><description>
&lt;p>etcd uses &lt;a href="https://prometheus.io/" target="_blank" rel="noopener">Prometheus&lt;/a> for metrics reporting. The metrics can be used for real-time monitoring and debugging. etcd does not persist its metrics; if a member restarts, the metrics will be reset.&lt;/p>
&lt;p>The simplest way to see the available metrics is to cURL the metrics endpoint &lt;code>/metrics&lt;/code>. The format is described &lt;a href="http://prometheus.io/docs/instrumenting/exposition_formats/" target="_blank" rel="noopener">here&lt;/a>.&lt;/p>
&lt;p>Follow the &lt;a href="https://prometheus.io/docs/introduction/getting_started/" target="_blank" rel="noopener">Prometheus getting started doc&lt;/a> to spin up a Prometheus server to collect etcd metrics.&lt;/p>
&lt;p>The naming of metrics follows the suggested &lt;a href="https://prometheus.io/docs/practices/naming/" target="_blank" rel="noopener">Prometheus best practices&lt;/a>. A metric name has an &lt;code>etcd&lt;/code> or &lt;code>etcd_debugging&lt;/code> prefix as its namespace and a subsystem prefix (for example &lt;code>wal&lt;/code> and &lt;code>etcdserver&lt;/code>).&lt;/p>
&lt;h2 id="etcd-namespace-metrics">etcd namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd&lt;/code> prefix are for monitoring and alerting. They are stable high level metrics. If there is any change of these metrics, it will be included in release notes.&lt;/p>
&lt;p>Metrics that are etcd2 related are documented &lt;a href="https://etcd.io/docs/v2.3/metrics/#http-requests">v2 metrics guide&lt;/a>.&lt;/p>
&lt;h3 id="server">Server&lt;/h3>
&lt;p>These metrics describe the status of the etcd server. In order to detect outages or problems for troubleshooting, the server metrics of every production etcd cluster should be closely monitored.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_server_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>has_leader&lt;/td>
&lt;td>Whether or not a leader exists. 1 is existence, 0 is not.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>leader_changes_seen_total&lt;/td>
&lt;td>The number of leader changes seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_committed_total&lt;/td>
&lt;td>The total number of consensus proposals committed.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_applied_total&lt;/td>
&lt;td>The total number of consensus proposals applied.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_pending&lt;/td>
&lt;td>The current number of pending proposals.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_failed_total&lt;/td>
&lt;td>The total number of failed proposals seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>has_leader&lt;/code> indicates whether the member has a leader. If a member does not have a leader, it is
totally unavailable. If all the members in the cluster do not have any leader, the entire cluster
is totally unavailable.&lt;/p>
&lt;p>&lt;code>leader_changes_seen_total&lt;/code> counts the number of leader changes the member has seen since its start. Rapid leadership changes impact the performance of etcd significantly. It also signals that the leader is unstable, perhaps due to network connectivity issues or excessive load hitting the etcd cluster.&lt;/p>
&lt;p>&lt;code>proposals_committed_total&lt;/code> records the total number of consensus proposals committed. This gauge should increase over time if the cluster is healthy. Several healthy members of an etcd cluster may have different total committed proposals at once. This discrepancy may be due to recovering from peers after starting, lagging behind the leader, or being the leader and therefore having the most commits. It is important to monitor this metric across all the members in the cluster; a consistently large lag between a single member and its leader indicates that member is slow or unhealthy.&lt;/p>
&lt;p>&lt;code>proposals_applied_total&lt;/code> records the total number of consensus proposals applied. The etcd server applies every committed proposal asynchronously. The difference between &lt;code>proposals_committed_total&lt;/code> and &lt;code>proposals_applied_total&lt;/code> should usually be small (within a few thousands even under high load). If the difference between them continues to rise, it indicates that the etcd server is overloaded. This might happen when applying expensive queries like heavy range queries or large txn operations.&lt;/p>
&lt;p>&lt;code>proposals_pending&lt;/code> indicates how many proposals are queued to commit. Rising pending proposals suggests there is a high client load or the member cannot commit proposals.&lt;/p>
&lt;p>&lt;code>proposals_failed_total&lt;/code> are normally related to two issues: temporary failures related to a leader election or longer downtime caused by a loss of quorum in the cluster.&lt;/p>
&lt;h3 id="disk">Disk&lt;/h3>
&lt;p>These metrics describe the status of the disk operations.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_disk_&lt;/code>.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>wal_fsync_duration_seconds&lt;/td>
&lt;td>The latency distributions of fsync called by wal&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>backend_commit_duration_seconds&lt;/td>
&lt;td>The latency distributions of commit called by backend.&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>A &lt;code>wal_fsync&lt;/code> is called when etcd persists its log entries to disk before applying them.&lt;/p>
&lt;p>A &lt;code>backend_commit&lt;/code> is called when etcd commits an incremental snapshot of its most recent changes to disk.&lt;/p>
&lt;p>High disk operation latencies (&lt;code>wal_fsync_duration_seconds&lt;/code> or &lt;code>backend_commit_duration_seconds&lt;/code>) often indicate disk issues. It may cause high request latency or make the cluster unstable.&lt;/p>
&lt;h3 id="network">Network&lt;/h3>
&lt;p>These metrics describe the status of the network.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_network_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>peer_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_sent_failures_total&lt;/td>
&lt;td>The total number of send failures from the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_failures_total&lt;/td>
&lt;td>The total number of receive failures from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_round_trip_time_seconds&lt;/td>
&lt;td>Round-Trip-Time histogram between peers.&lt;/td>
&lt;td>Histogram(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>peer_sent_bytes_total&lt;/code> counts the total number of bytes sent to a specific peer. Usually the leader member sends more data than other members since it is responsible for transmitting replicated data.&lt;/p>
&lt;p>&lt;code>peer_received_bytes_total&lt;/code> counts the total number of bytes received from a specific peer. Usually follower members receive data only from the leader member.&lt;/p>
&lt;h3 id="grpc-requests">gRPC requests&lt;/h3>
&lt;p>These metrics are exposed via &lt;a href="https://github.com/grpc-ecosystem/go-grpc-prometheus" target="_blank" rel="noopener">go-grpc-prometheus&lt;/a>.&lt;/p>
&lt;h2 id="etcd_debugging-namespace-metrics">etcd_debugging namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd_debugging&lt;/code> prefix are for debugging. They are very implementation dependent and volatile. They might be changed or removed without any warning in new etcd releases. Some of the metrics might be moved to the &lt;code>etcd&lt;/code> prefix when they become more stable.&lt;/p>
&lt;h3 id="snapshot">Snapshot&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>snapshot_save_total_duration_seconds&lt;/td>
&lt;td>The total latency distributions of save called by snapshot&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Abnormally high snapshot duration (&lt;code>snapshot_save_total_duration_seconds&lt;/code>) indicates disk issues and might cause the cluster to be unstable.&lt;/p>
&lt;h2 id="prometheus-supplied-metrics">Prometheus supplied metrics&lt;/h2>
&lt;p>The Prometheus client library provides a number of metrics under the &lt;code>go&lt;/code> and &lt;code>process&lt;/code> namespaces. There are a few that are particularly interesting.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>process_open_fds&lt;/td>
&lt;td>Number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>process_max_fds&lt;/td>
&lt;td>Maximum number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Heavy file descriptor (&lt;code>process_open_fds&lt;/code>) usage (i.e., near the process&amp;rsquo;s file descriptor limit, &lt;code>process_max_fds&lt;/code>) indicates a potential file descriptor exhaustion issue. If the file descriptors are exhausted, etcd may panic because it cannot create new WAL files.&lt;/p>
&lt;h2 id="generated-list-of-metrics">Generated list of metrics&lt;/h2>
&lt;table>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.4.0.txt">v3.4.0&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.1.txt">v3.4.1&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.10.txt">v3.4.10&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.11.txt">v3.4.11&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.12.txt">v3.4.12&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.13.txt">v3.4.13&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.4.2.txt">v3.4.2&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.3.txt">v3.4.3&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.4.txt">v3.4.4&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.5.txt">v3.4.5&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.6.txt">v3.4.6&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.7.txt">v3.4.7&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-v3.4.8.txt">v3.4.8&lt;/a>&lt;/td>
&lt;td>&lt;a href="etcd-metrics-v3.4.9.txt">v3.4.9&lt;/a>&lt;/td>
&lt;/table></description></item><item><title>Docs: Metrics</title><link>https://etcd.io/docs/v3.5/metrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.5/metrics/</guid><description>
&lt;p>etcd uses &lt;a href="https://prometheus.io/" target="_blank" rel="noopener">Prometheus&lt;/a> for metrics reporting. The metrics can be used for real-time monitoring and debugging. etcd does not persist its metrics; if a member restarts, the metrics will be reset.&lt;/p>
&lt;p>The simplest way to see the available metrics is to cURL the metrics endpoint &lt;code>/metrics&lt;/code>. The format is described &lt;a href="http://prometheus.io/docs/instrumenting/exposition_formats/" target="_blank" rel="noopener">here&lt;/a>.&lt;/p>
&lt;p>Follow the &lt;a href="https://prometheus.io/docs/introduction/getting_started/" target="_blank" rel="noopener">Prometheus getting started doc&lt;/a> to spin up a Prometheus server to collect etcd metrics.&lt;/p>
&lt;p>The naming of metrics follows the suggested &lt;a href="https://prometheus.io/docs/practices/naming/" target="_blank" rel="noopener">Prometheus best practices&lt;/a>. A metric name has an &lt;code>etcd&lt;/code> or &lt;code>etcd_debugging&lt;/code> prefix as its namespace and a subsystem prefix (for example &lt;code>wal&lt;/code> and &lt;code>etcdserver&lt;/code>).&lt;/p>
&lt;h2 id="etcd-namespace-metrics">etcd namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd&lt;/code> prefix are for monitoring and alerting. They are stable high level metrics. If there is any change of these metrics, it will be included in release notes.&lt;/p>
&lt;p>Metrics that are etcd2 related are documented in the &lt;a href="https://etcd.io/docs/v2.3/metrics/#http-requests">v2 metrics guide&lt;/a>.&lt;/p>
&lt;h3 id="server">Server&lt;/h3>
&lt;p>These metrics describe the status of the etcd server. In order to detect outages or problems for troubleshooting, the server metrics of every production etcd cluster should be closely monitored.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_server_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>has_leader&lt;/td>
&lt;td>Whether or not a leader exists. 1 is existence, 0 is not.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>leader_changes_seen_total&lt;/td>
&lt;td>The number of leader changes seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_committed_total&lt;/td>
&lt;td>The total number of consensus proposals committed.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_applied_total&lt;/td>
&lt;td>The total number of consensus proposals applied.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_pending&lt;/td>
&lt;td>The current number of pending proposals.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_failed_total&lt;/td>
&lt;td>The total number of failed proposals seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>has_leader&lt;/code> indicates whether the member has a leader. If a member does not have a leader, it is
totally unavailable. If all the members in the cluster do not have any leader, the entire cluster
is totally unavailable.&lt;/p>
&lt;p>&lt;code>leader_changes_seen_total&lt;/code> counts the number of leader changes the member has seen since its start. Rapid leadership changes impact the performance of etcd significantly. It also signals that the leader is unstable, perhaps due to network connectivity issues or excessive load hitting the etcd cluster.&lt;/p>
&lt;p>&lt;code>proposals_committed_total&lt;/code> records the total number of consensus proposals committed. This gauge should increase over time if the cluster is healthy. Several healthy members of an etcd cluster may have different total committed proposals at once. This discrepancy may be due to recovering from peers after starting, lagging behind the leader, or being the leader and therefore having the most commits. It is important to monitor this metric across all the members in the cluster; a consistently large lag between a single member and its leader indicates that member is slow or unhealthy.&lt;/p>
&lt;p>&lt;code>proposals_applied_total&lt;/code> records the total number of consensus proposals applied. The etcd server applies every committed proposal asynchronously. The difference between &lt;code>proposals_committed_total&lt;/code> and &lt;code>proposals_applied_total&lt;/code> should usually be small (within a few thousands even under high load). If the difference between them continues to rise, it indicates that the etcd server is overloaded. This might happen when applying expensive queries like heavy range queries or large txn operations.&lt;/p>
&lt;p>&lt;code>proposals_pending&lt;/code> indicates how many proposals are queued to commit. Rising pending proposals suggests there is a high client load or the member cannot commit proposals.&lt;/p>
&lt;p>&lt;code>proposals_failed_total&lt;/code> are normally related to two issues: temporary failures related to a leader election or longer downtime caused by a loss of quorum in the cluster.&lt;/p>
&lt;h3 id="disk">Disk&lt;/h3>
&lt;p>These metrics describe the status of the disk operations.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_disk_&lt;/code>.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>wal_fsync_duration_seconds&lt;/td>
&lt;td>The latency distributions of fsync called by wal&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>backend_commit_duration_seconds&lt;/td>
&lt;td>The latency distributions of commit called by backend.&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>A &lt;code>wal_fsync&lt;/code> is called when etcd persists its log entries to disk before applying them.&lt;/p>
&lt;p>A &lt;code>backend_commit&lt;/code> is called when etcd commits an incremental snapshot of its most recent changes to disk.&lt;/p>
&lt;p>High disk operation latencies (&lt;code>wal_fsync_duration_seconds&lt;/code> or &lt;code>backend_commit_duration_seconds&lt;/code>) often indicate disk issues. It may cause high request latency or make the cluster unstable.&lt;/p>
&lt;h3 id="network">Network&lt;/h3>
&lt;p>These metrics describe the status of the network.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_network_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>peer_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_sent_failures_total&lt;/td>
&lt;td>The total number of send failures from the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_failures_total&lt;/td>
&lt;td>The total number of receive failures from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_round_trip_time_seconds&lt;/td>
&lt;td>Round-Trip-Time histogram between peers.&lt;/td>
&lt;td>Histogram(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>peer_sent_bytes_total&lt;/code> counts the total number of bytes sent to a specific peer. Usually the leader member sends more data than other members since it is responsible for transmitting replicated data.&lt;/p>
&lt;p>&lt;code>peer_received_bytes_total&lt;/code> counts the total number of bytes received from a specific peer. Usually follower members receive data only from the leader member.&lt;/p>
&lt;h3 id="grpc-requests">gRPC requests&lt;/h3>
&lt;p>These metrics are exposed via &lt;a href="https://github.com/grpc-ecosystem/go-grpc-prometheus" target="_blank" rel="noopener">go-grpc-prometheus&lt;/a>.&lt;/p>
&lt;h2 id="etcd_debugging-namespace-metrics">etcd_debugging namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd_debugging&lt;/code> prefix are for debugging. They are very implementation dependent and volatile. They might be changed or removed without any warning in new etcd releases. Some of the metrics might be moved to the &lt;code>etcd&lt;/code> prefix when they become more stable.&lt;/p>
&lt;h3 id="snapshot">Snapshot&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>snapshot_save_total_duration_seconds&lt;/td>
&lt;td>The total latency distributions of save called by snapshot&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Abnormally high snapshot duration (&lt;code>snapshot_save_total_duration_seconds&lt;/code>) indicates disk issues and might cause the cluster to be unstable.&lt;/p>
&lt;h2 id="prometheus-supplied-metrics">Prometheus supplied metrics&lt;/h2>
&lt;p>The Prometheus client library provides a number of metrics under the &lt;code>go&lt;/code> and &lt;code>process&lt;/code> namespaces. There are a few that are particularly interesting.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>process_open_fds&lt;/td>
&lt;td>Number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>process_max_fds&lt;/td>
&lt;td>Maximum number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Heavy file descriptor (&lt;code>process_open_fds&lt;/code>) usage (i.e., near the process&amp;rsquo;s file descriptor limit, &lt;code>process_max_fds&lt;/code>) indicates a potential file descriptor exhaustion issue. If the file descriptors are exhausted, etcd may panic because it cannot create new WAL files.&lt;/p>
&lt;h2 id="generated-list-of-metrics">Generated list of metrics&lt;/h2>
&lt;table>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-latest.txt">latest&lt;/a>&lt;/td>
&lt;/table></description></item><item><title>Docs: Metrics</title><link>https://etcd.io/docs/v3.6/metrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.6/metrics/</guid><description>
&lt;p>etcd uses &lt;a href="https://prometheus.io/" target="_blank" rel="noopener">Prometheus&lt;/a> for metrics reporting. The metrics can be used for real-time monitoring and debugging. etcd does not persist its metrics; if a member restarts, the metrics will be reset.&lt;/p>
&lt;p>The simplest way to see the available metrics is to cURL the metrics endpoint &lt;code>/metrics&lt;/code>. The format is described &lt;a href="http://prometheus.io/docs/instrumenting/exposition_formats/" target="_blank" rel="noopener">here&lt;/a>.&lt;/p>
&lt;p>Follow the &lt;a href="https://prometheus.io/docs/introduction/getting_started/" target="_blank" rel="noopener">Prometheus getting started doc&lt;/a> to spin up a Prometheus server to collect etcd metrics.&lt;/p>
&lt;p>The naming of metrics follows the suggested &lt;a href="https://prometheus.io/docs/practices/naming/" target="_blank" rel="noopener">Prometheus best practices&lt;/a>. A metric name has an &lt;code>etcd&lt;/code> or &lt;code>etcd_debugging&lt;/code> prefix as its namespace and a subsystem prefix (for example &lt;code>wal&lt;/code> and &lt;code>etcdserver&lt;/code>).&lt;/p>
&lt;h2 id="etcd-namespace-metrics">etcd namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd&lt;/code> prefix are for monitoring and alerting. They are stable high level metrics. If there is any change of these metrics, it will be included in release notes.&lt;/p>
&lt;p>Metrics that are etcd2 related are documented in the &lt;a href="https://etcd.io/docs/v2.3/metrics/#http-requests">v2 metrics guide&lt;/a>.&lt;/p>
&lt;h3 id="server">Server&lt;/h3>
&lt;p>These metrics describe the status of the etcd server. In order to detect outages or problems for troubleshooting, the server metrics of every production etcd cluster should be closely monitored.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_server_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>has_leader&lt;/td>
&lt;td>Whether or not a leader exists. 1 is existence, 0 is not.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>leader_changes_seen_total&lt;/td>
&lt;td>The number of leader changes seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_committed_total&lt;/td>
&lt;td>The total number of consensus proposals committed.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_applied_total&lt;/td>
&lt;td>The total number of consensus proposals applied.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_pending&lt;/td>
&lt;td>The current number of pending proposals.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proposals_failed_total&lt;/td>
&lt;td>The total number of failed proposals seen.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>has_leader&lt;/code> indicates whether the member has a leader. If a member does not have a leader, it is
totally unavailable. If all the members in the cluster do not have any leader, the entire cluster
is totally unavailable.&lt;/p>
&lt;p>&lt;code>leader_changes_seen_total&lt;/code> counts the number of leader changes the member has seen since its start. Rapid leadership changes impact the performance of etcd significantly. It also signals that the leader is unstable, perhaps due to network connectivity issues or excessive load hitting the etcd cluster.&lt;/p>
&lt;p>&lt;code>proposals_committed_total&lt;/code> records the total number of consensus proposals committed. This gauge should increase over time if the cluster is healthy. Several healthy members of an etcd cluster may have different total committed proposals at once. This discrepancy may be due to recovering from peers after starting, lagging behind the leader, or being the leader and therefore having the most commits. It is important to monitor this metric across all the members in the cluster; a consistently large lag between a single member and its leader indicates that member is slow or unhealthy.&lt;/p>
&lt;p>&lt;code>proposals_applied_total&lt;/code> records the total number of consensus proposals applied. The etcd server applies every committed proposal asynchronously. The difference between &lt;code>proposals_committed_total&lt;/code> and &lt;code>proposals_applied_total&lt;/code> should usually be small (within a few thousands even under high load). If the difference between them continues to rise, it indicates that the etcd server is overloaded. This might happen when applying expensive queries like heavy range queries or large txn operations.&lt;/p>
&lt;p>&lt;code>proposals_pending&lt;/code> indicates how many proposals are queued to commit. Rising pending proposals suggests there is a high client load or the member cannot commit proposals.&lt;/p>
&lt;p>&lt;code>proposals_failed_total&lt;/code> are normally related to two issues: temporary failures related to a leader election or longer downtime caused by a loss of quorum in the cluster.&lt;/p>
&lt;h3 id="disk">Disk&lt;/h3>
&lt;p>These metrics describe the status of the disk operations.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_disk_&lt;/code>.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>wal_fsync_duration_seconds&lt;/td>
&lt;td>The latency distributions of fsync called by wal&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>backend_commit_duration_seconds&lt;/td>
&lt;td>The latency distributions of commit called by backend.&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>A &lt;code>wal_fsync&lt;/code> is called when etcd persists its log entries to disk before applying them.&lt;/p>
&lt;p>A &lt;code>backend_commit&lt;/code> is called when etcd commits an incremental snapshot of its most recent changes to disk.&lt;/p>
&lt;p>High disk operation latencies (&lt;code>wal_fsync_duration_seconds&lt;/code> or &lt;code>backend_commit_duration_seconds&lt;/code>) often indicate disk issues. It may cause high request latency or make the cluster unstable.&lt;/p>
&lt;h3 id="network">Network&lt;/h3>
&lt;p>These metrics describe the status of the network.&lt;/p>
&lt;p>All these metrics are prefixed with &lt;code>etcd_network_&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>peer_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_sent_failures_total&lt;/td>
&lt;td>The total number of send failures from the peer with ID &lt;code>To&lt;/code>.&lt;/td>
&lt;td>Counter(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_received_failures_total&lt;/td>
&lt;td>The total number of receive failures from the peer with ID &lt;code>From&lt;/code>.&lt;/td>
&lt;td>Counter(From)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>peer_round_trip_time_seconds&lt;/td>
&lt;td>Round-Trip-Time histogram between peers.&lt;/td>
&lt;td>Histogram(To)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_sent_bytes_total&lt;/td>
&lt;td>The total number of bytes sent to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client_grpc_received_bytes_total&lt;/td>
&lt;td>The total number of bytes received to grpc clients.&lt;/td>
&lt;td>Counter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>peer_sent_bytes_total&lt;/code> counts the total number of bytes sent to a specific peer. Usually the leader member sends more data than other members since it is responsible for transmitting replicated data.&lt;/p>
&lt;p>&lt;code>peer_received_bytes_total&lt;/code> counts the total number of bytes received from a specific peer. Usually follower members receive data only from the leader member.&lt;/p>
&lt;h3 id="grpc-requests">gRPC requests&lt;/h3>
&lt;p>These metrics are exposed via &lt;a href="https://github.com/grpc-ecosystem/go-grpc-prometheus" target="_blank" rel="noopener">go-grpc-prometheus&lt;/a>.&lt;/p>
&lt;h2 id="etcd_debugging-namespace-metrics">etcd_debugging namespace metrics&lt;/h2>
&lt;p>The metrics under the &lt;code>etcd_debugging&lt;/code> prefix are for debugging. They are very implementation dependent and volatile. They might be changed or removed without any warning in new etcd releases. Some of the metrics might be moved to the &lt;code>etcd&lt;/code> prefix when they become more stable.&lt;/p>
&lt;h3 id="snapshot">Snapshot&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>snapshot_save_total_duration_seconds&lt;/td>
&lt;td>The total latency distributions of save called by snapshot&lt;/td>
&lt;td>Histogram&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Abnormally high snapshot duration (&lt;code>snapshot_save_total_duration_seconds&lt;/code>) indicates disk issues and might cause the cluster to be unstable.&lt;/p>
&lt;h2 id="prometheus-supplied-metrics">Prometheus supplied metrics&lt;/h2>
&lt;p>The Prometheus client library provides a number of metrics under the &lt;code>go&lt;/code> and &lt;code>process&lt;/code> namespaces. There are a few that are particularly interesting.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Type&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>process_open_fds&lt;/td>
&lt;td>Number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>process_max_fds&lt;/td>
&lt;td>Maximum number of open file descriptors.&lt;/td>
&lt;td>Gauge&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Heavy file descriptor (&lt;code>process_open_fds&lt;/code>) usage (i.e., near the process&amp;rsquo;s file descriptor limit, &lt;code>process_max_fds&lt;/code>) indicates a potential file descriptor exhaustion issue. If the file descriptors are exhausted, etcd may panic because it cannot create new WAL files.&lt;/p>
&lt;h2 id="generated-list-of-metrics">Generated list of metrics&lt;/h2>
&lt;table>
&lt;tr>
&lt;td>&lt;a href="etcd-metrics-latest.txt">latest&lt;/a>&lt;/td>
&lt;/table></description></item><item><title>Docs: Reporting bugs</title><link>https://etcd.io/docs/v3.4/reporting_bugs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://etcd.io/docs/v3.4/reporting_bugs/</guid><description>
&lt;p>If any part of the etcd project has bugs or documentation mistakes, please let us know by &lt;a href="https://github.com/etcd-io/etcd/issues/new" target="_blank" rel="noopener">opening an issue&lt;/a>. We treat bugs and mistakes very seriously and believe no issue is too small. Before creating a bug report, please check that an issue reporting the same problem does not already exist.&lt;/p>
&lt;p>To make the bug report accurate and easy to understand, please try to create bug reports that are:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Specific. Include as much details as possible: which version, what environment, what configuration, etc. If the bug is related to running the etcd server, please attach the etcd log (the starting log with etcd configuration is especially important).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Reproducible. Include the steps to reproduce the problem. We understand some issues might be hard to reproduce, please includes the steps that might lead to the problem. If possible, please attach the affected etcd data dir and stack strace to the bug report.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Isolated. Please try to isolate and reproduce the bug with minimum dependencies. It would significantly slow down the speed to fix a bug if too many dependencies are involved in a bug report. Debugging external systems that rely on etcd is out of scope, but we are happy to provide guidance in the right direction or help with using etcd itself.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Unique. Do not duplicate existing bug report.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Scoped. One bug per report. Do not follow up with another bug inside one report.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>It may be worthwhile to read &lt;a href="http://fantasai.inkedblade.net/style/talks/filing-good-bugs/" target="_blank" rel="noopener">Elika Etemad’s article on filing good bug reports&lt;/a> before creating a bug report.&lt;/p>
&lt;p>We might ask for further information to locate a bug. A duplicated bug report will be closed.&lt;/p>
&lt;h2 id="frequently-asked-questions">Frequently asked questions&lt;/h2>
&lt;h3 id="how-to-get-a-stack-trace">How to get a stack trace&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">kill&lt;/span> -QUIT &lt;span style="color:#000">$PID&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="how-to-get-etcd-version">How to get etcd version&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ etcd --version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="how-to-get-etcd-configuration-and-log-when-it-runs-as-systemd-service-etcd2service">How to get etcd configuration and log when it runs as systemd service ‘etcd2.service’&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ sudo systemctl cat etcd2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ sudo journalctl -u etcd2
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Due to an upstream systemd bug, journald may miss the last few log lines when its processes exit. If journalctl says etcd stopped without fatal or panic message, try &lt;code>sudo journalctl -f -t etcd2&lt;/code> to get full log.&lt;/p></description></item></channel></rss>