From Wikiversity
Jump to navigation Jump to search

etcd is a distributed key/value store that uses the Raft consensus algorithm to manage a highly-available replicated store, it is used as a software component for software such as CoreOS Container Linux or Kubernetes and for many organizations such as wikipedia[1]

Beside the configuration management, etcd also provides service discovery by allowing deployed applications to announce themselves and the services they offer. Communication with etcd is performed through an exposed REST-based API, which internally uses JSON on top of HTTP; the API may be used directly (through curl or wget, for example), or indirectly through etcdctl

Basic etcd Operation[edit]

Adding a new member to the cluster[edit]

To add a new server called to our cluster, using the etcdctl tool:

$ etcdctl -C member add conf1001
Added member named conf1001 with ID 5f62a924ac85910 to cluster

# Next line is broken down artificially for ease of reading

etcd ports[edit]

TCP Ports 2379 for client communication and on port 2380 for server-to-server communication needs to be open [2]

See also[edit]