LinuxCommandLibrary

etcd

distributed key-value store with Raft consensus

TLDR

Start etcd server
$ etcd
copy
Start with custom data directory
$ etcd --data-dir [/var/lib/etcd]
copy
Start with specific listen address
$ etcd --listen-client-urls [http://localhost:2379]
copy
Start with advertised URLs
$ etcd --advertise-client-urls [http://localhost:2379]
copy
Start a cluster member
$ etcd --name [node1] --initial-cluster [node1=http://host1:2380,node2=http://host2:2380]
copy
Enable TLS
$ etcd --cert-file [cert.pem] --key-file [key.pem]
copy

SYNOPSIS

etcd [options]

DESCRIPTION

etcd is a distributed key-value store that provides reliable, consistent data storage for distributed systems. It implements the Raft consensus algorithm to ensure strong consistency across multiple nodes, making it suitable for critical configuration data and service coordination.
The server forms the backbone of Kubernetes cluster state management and is used extensively in cloud-native architectures for configuration management, service discovery, and distributed locking. Its simple HTTP/gRPC API and watch functionality enable applications to respond to configuration changes in real-time.
etcd prioritizes consistency and availability, making it ideal for storing cluster membership, feature flags, and other distributed system metadata.

PARAMETERS

--name name

Human-readable node name.
--data-dir path
Data directory path.
--listen-client-urls urls
Client listen URLs.
--advertise-client-urls urls
Advertised client URLs.
--listen-peer-urls urls
Peer listen URLs.
--initial-cluster config
Initial cluster configuration.
--initial-cluster-state state
Initial cluster state (new or existing).
--cert-file file
TLS certificate file.
--key-file file
TLS key file.

CONFIGURATION

/etc/etcd/etcd.conf.yml

Main configuration file for etcd server settings, cluster topology, and security options.

CAVEATS

Requires careful cluster planning for production use. Network partitions affect availability. Disk performance impacts latency. Regular backups essential. Raft consensus requires quorum majority.

HISTORY

etcd was created by CoreOS in 2013 and became a Cloud Native Computing Foundation (CNCF) project. It has become the de facto standard for Kubernetes configuration storage and is widely deployed in production cloud environments.

SEE ALSO

etcdctl(1), etcdutl(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard