Skip to main content

etcd (etcd)

Distributed, consistent key value store used for coordination, configuration and leader election. Single member or odd cluster.

Generated from catalog/services/etcd.yaml: do not edit by hand.

Summary​

Version3.5.35
Useinstall and configure
Layerinfrastructure (shown apart)
CategoryData platforms
Installation methodsbinary, podman
External connectionno
Sandbox onlyno

Licence​

SPDX identifierApache-2.0
Licence policycore licence (MIT or Apache-2.0)
Licence exception-
Platform componentetcd

Packages and artifacts​

A package the project of the service publishes (its image, its binary archive, its Python or OS package) carries the licence of the service; a third-party package carries the licence written on its row, read from the official upstream metadata.

KindPackageVersionLicenceDetails
container imagequay.io/coreos/etcdv3.5.35Apache-2.0image key etcd, used by etcd, digest sha256:60eea0773022eb2c38b73091e93d6784e0663212e6c4b98faf5547e99058e35d
binary archiveetcd-v3.5.35-linux-amd64.tar.gz3.5.35Apache-2.0https://github.com/etcd-io/etcd/releases/download/v3.5.35/etcd-v3.5.35-linux-amd64.tar.gz, x86_64, checksum sha256

Images are pinned by tag in the descriptor, and by digest when the descriptor declares one (the offline bundle then refuses a pulled image that does not carry it); the digest is recorded in the mirror of the Manager when the offline bundle is imported, and every pull or load is checked against it.

Supported systems and architectures​

MethodOperating systemsArchitectures
binaryRHEL family (dnf), Debian family (apt), Arch Linux (pacman)x86_64 (architecture of the artifacts of the descriptor)
podmanRHEL family (dnf), Debian family (apt), Arch Linux (pacman)x86_64, aarch64 (not restricted by the descriptor)

Certified host systems: RHEL 8/9/10, Rocky Linux 8/9/10, AlmaLinux 8/9/10, Oracle Linux 8/9, CentOS Stream 9/10, Ubuntu 22.04/24.04, Debian 12, Arch Linux (rolling). The host preflight accepts these systems (other releases of a known family give a warning, end of life releases are refused) and the x86_64 and aarch64 architectures.

Prerequisites​

Host​

  • at least 1024 MB of memory (blocking, memory).
  • a synchronized clock (blocking, time_sync).

Network and ports​

ComponentPort namePortOpened in the host firewall
etcdclient2379/tcpyes
etcdpeer2380/tcpyes
etcdmetrics2381/tcpyes

Services and connections needed​

This service has no dependency.

Installation methods and modes​

MethodDefaultWhat the method uses
binaryyesthe binary archives of the descriptor, unpacked under the service directory
podman-the container images of the descriptor, run by Podman under systemd

Components​

ComponentKindInstallation methodsPorts
etcd member (etcd)masterbinary, podman2379/tcp, 2380/tcp, 2381/tcp

Single member (standalone) (default)​

One etcd member, without fault tolerance.

What the mode deploys:

ComponentPlacement
etcdmin 1, max 1

Cluster (cluster)​

An odd number of members (3, 5 or 7) keeping a Raft quorum.

What the mode deploys:

ComponentPlacement
etcdmin 3, max 7, odd number, recommended 3

Install this service​

The install wizard of the Navin Manager plans, validates and runs the installation; you need the services:install permission on the cluster.

  1. Open the wizard. In Clusters, choose the row action Install services of the target cluster. The wizard opens on its first step, Service.

  2. Choose the service. On the Service step, select etcd. The card shows the licence Apache-2.0. Pick the Method among binary, podman (default binary).

  3. Choose the hosts and the mode. On the Hosts step, tick the hosts, then choose the Mode: standalone (default), cluster. Each mode deploys the components listed in Installation methods and modes.

  4. Bindings. This service has no dependency: the Bindings step has nothing to bind.

  5. Configure. On the Configure step, review the parameters (see Configuration parameters). Passwords left empty with a generated default are generated and sealed by the Manager.

  6. Review and install. On the Install step the Manager validates the plan and shows the installation order; when it says "The plan is valid. Ready to install.", choose Install. A highly available mode is installed only when its HA checks pass.

  7. Verify. The operation ends when the health checks of every instance pass (see Health checks); the service then shows as running in Services. Open the service and choose Run the smoke test in the Checks card: Writes a key, reads it back through etcdctl and deletes it.

High availability​

Clusternative (native)
High availabilitynative (native)
Failovernative (native)
Replicationnative (native)
QuorumRaft (raft)
Discoverystatic (static)
Entry pointclient discovery (client-discovery)
Official documentationhttps://etcd.io/docs/v3.5/op-guide/clustering/
Peer TLS parametertls_enabled
Cluster status commandendpoint_status

Topology per mode​

ModesHighest catalog levelDistributionQuorum componentFault domainsDescription
standalonestandalone (standalone)single (single)-1One member, without fault tolerance.
clustercluster (cluster)active-active (active-active)etcd33, 5 or 7 Raft members; the cluster survives the loss of a minority.

Notes​

  • Each member needs a persistent, low latency disk: Raft writes every change to the disk of the majority before answering.

Configuration parameters​

Network​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Client port (client_port)port2379-nononoPort of the client API.
Peer port (peer_port)port2380-nononoPort of the Raft traffic between members.
Metrics port (metrics_port)port2381-nononoPort of /metrics and /health without client authentication.

Storage​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Backend quota (quota_backend_mb)int2048min 256, max 8192, MBnononoMaximum size of the database before alarms.
Compaction retention (auto_compaction_retention)string1h-nononoHistory kept before automatic compaction.

Security​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
TLS (tls_enabled)boolfalse-nononoEncrypt client and peer traffic with certificates of the manager CA.
Cluster token (cluster_token)stringnavin-etcd^[a-z0-9-]{3,64}$nononoInitial cluster token, unique per etcd cluster.

Endpoints​

EndpointSchemeComponentPortPathTLS parameterBinding parametersBinding secretsProvisioning command
clienthttpetcd2379 (client_port)-tls_enabled---

Commands​

CommandComponentTargetDescription
List members (member_list)etcdfirst hostLists the members of the etcd cluster.
Endpoint status (endpoint_status)etcdfirst hostShows leader, Raft index and database size of every member.
Take a snapshot (snapshot)etcdfirst hostSaves a snapshot of the key space under the data directory.
Defragment (defragment)etcdevery hostReleases the free space of the database of every member.

Health checks​

Liveness (per instance)​

ComponentCheckDetails
etcdHTTP http://{{ host.ip or '127.0.0.1' }}:{{ config.metrics_port }}/healthExpected 200; 60 retries

Readiness (service check)​

CheckDetails
HTTP http://{{ host.ip or '127.0.0.1' }}:{{ config.metrics_port }}/healthExpected 200

Smoke test​

Writes a key, reads it back through etcdctl and deletes it. (etcd: put, get, delete)

Preflight checks​

CheckTypeMeaningSeverityComponents
memorymemory_mb {"min": 1024}at least 1024 MB of memoryblockingevery component
time_synctime_sync {}a synchronized clockblockingevery component
client_port_freeport_free {"param": "client_port"}port 2379 free on the hostblockingevery component

Backup and restore​

Consistent snapshot of the key space (etcdctl snapshot save); the restore rebuilds the data directory of a single member with etcdutl.

Formatetcd-snapshot
Componentetcd
Files{{ backup.dir }}/etcd.db
Restore testyes
Instances stopped for the restoreyes

Upgrade​

Supported from3.5.21
Statefulyes
Backup before the upgradeyes
Rollbackyes

Uninstall​

Paths removed when the data is purged: {{ paths.data }}, {{ paths.log }}.

Upstream documentation​