etcd(1)

πŸ“¦
version 3.5.30 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 etcd 🌸 (that's etcd(1) bestie, a User Command, she's iconic)

okay so picture this: you need a key value store that is highly-available. That's her. That's etcd. She's the main character of your cluster and she never misses. πŸ’–


✨ NAME ✨

etcd β€” highly-available key value store. yes that's the whole name. she's simple like that. πŸ‘‘


✨ SYNOPSIS ✨

etcd [flags]

that's it. that's the whole vibe. flags only, no positional args, no drama. πŸŽ€


πŸ’… FLAGS πŸ’…

πŸŽ€ Member πŸŽ€

all the stuff about this member specifically, her little identity crisis corner πŸ¦‹

  • --name 'default' β€” a human-readable name for this member. give her a name bestie, she deserves one.
  • --data-dir '${name}.etcd' β€” path to the data directory. notice the default literally interpolates the member name, she's self-referential like that.
  • --wal-dir '' β€” path to the dedicated wal directory.
  • --snapshot-count '100000' β€” how many committed transactions pile up before she triggers a snapshot to disk.
  • --heartbeat-interval '100' β€” heartbeat interval, in milliseconds.
  • --election-timeout '1000' β€” how long, in milliseconds, an election gets before it times out. See the tuning documentation for the deets, iykyk.
  • --initial-election-tick-advance 'true' β€” whether to fast-forward the initial election ticks on boot so the election happens faster.
  • --listen-peer-urls 'http://localhost:2380' β€” the list of URLs to listen on for peer traffic.
  • --listen-client-urls 'http://localhost:2379' β€” the list of URLs to listen on for client traffic.
  • --max-snapshots '5' β€” max snapshot files to keep around (0 means unlimited, go off).
  • --max-wals '5' β€” max wal files to keep around (0 means unlimited).
  • --quota-backend-bytes '0' β€” raises alarms when the backend size goes over the quota you gave (0 defaults to the low space quota).
  • --backend-batch-interval '' β€” BackendBatchInterval is the maximum time before committing the backend transaction.
  • --backend-batch-limit '0' β€” BackendBatchLimit is the maximum operations before committing the backend transaction.
  • --max-txn-ops '128' β€” max number of operations allowed inside one transaction.
  • --max-request-bytes '1572864' β€” biggest client request size in bytes the server will accept.
  • --max-concurrent-streams 'math.MaxUint32' β€” max concurrent streams each client can have open at once.
  • --grpc-keepalive-min-time '5s' β€” minimum duration a client should wait before pinging the server.
  • --grpc-keepalive-interval '2h' β€” how often the server pings the client to check the connection is alive (0 to disable).
  • --grpc-keepalive-timeout '20s' β€” extra wait before closing a non-responsive connection (0 to disable).

πŸŽ€ Clustering πŸŽ€

she's not like other girls, she's a distributed consensus girlie 🌈

  • --initial-advertise-peer-urls 'http://localhost:2380' β€” the list of this member's peer URLs to advertise to the rest of the cluster.
  • --initial-cluster 'default=http://localhost:2380' β€” initial cluster config for bootstrapping.
  • --initial-cluster-state 'new' β€” initial cluster state, either 'new' or 'existing'.
  • --initial-cluster-token 'etcd-cluster' β€” the initial cluster token for the etcd cluster during bootstrap. specifying this protects you from unintended cross-cluster interaction when you're running multiple clusters. very much a "boundaries" moment. πŸ’…
  • --advertise-client-urls 'http://localhost:2379' β€” the list of this member's client URLs to advertise to the public. these advertised client URLs should be reachable by machines that talk to the etcd cluster, and etcd client libraries parse these URLs to connect to the cluster. no cap.
  • --discovery '' β€” discovery URL used to bootstrap the cluster.
  • --discovery-fallback 'proxy' β€” expected behavior ('exit' or 'proxy') when the discovery service fails. "proxy" supports the v2 API only. 🫠
  • --discovery-proxy '' β€” HTTP proxy to use for traffic to the discovery service.
  • --discovery-srv '' β€” DNS srv domain used to bootstrap the cluster.
  • --discovery-srv-name '' β€” suffix to the dns srv name queried when bootstrapping.
  • --strict-reconfig-check 'true' β€” reject reconfiguration requests that would cause quorum loss. she's protective, we love that.
  • --pre-vote 'false' β€” enable this to run an additional Raft election phase.
  • --auto-compaction-retention '0' β€” auto compaction retention length. 0 means auto compaction is disabled.
  • --auto-compaction-mode 'periodic' β€” how to interpret 'auto-compaction-retention', one of: periodic|revision. 'periodic' is duration-based retention and defaults to hours if you don't give a time unit (e.g. '5m'). 'revision' is revision-number-based retention.
  • --enable-v2 'false' β€” accept etcd V2 client requests.

πŸŽ€ Security πŸŽ€

TLS era. lock it down bestie, she's got certificates and she's not afraid to use them πŸ”βœ¨

  • --cert-file '' β€” path to the client server TLS cert file.
  • --key-file '' β€” path to the client server TLS key file.
  • --client-cert-auth 'false' β€” enable client cert authentication.
  • --client-crl-file '' β€” path to the client certificate revocation list file.
  • --client-cert-allowed-hostname '' β€” allowed TLS hostname for client cert authentication.
  • --trusted-ca-file '' β€” path to the client server TLS trusted CA cert file.
  • --auto-tls 'false' β€” client TLS using generated certificates.
  • --peer-cert-file '' β€” path to the peer server TLS cert file.
  • --peer-key-file '' β€” path to the peer server TLS key file.
  • --peer-client-cert-auth 'false' β€” enable peer client cert authentication.
  • --peer-trusted-ca-file '' β€” path to the peer server TLS trusted CA file.
  • --peer-cert-allowed-cn '' β€” required CN for client certs connecting to the peer endpoint.
  • --peer-cert-allowed-hostname '' β€” allowed TLS hostname for inter-peer authentication.
  • --peer-auto-tls 'false' β€” peer TLS using self-generated certificates if --peer-key-file and --peer-cert-file aren't provided.
  • --peer-crl-file '' β€” path to the peer certificate revocation list file.
  • --cipher-suites '' β€” comma-separated list of supported TLS cipher suites between client/server and peers (empty means Go auto-populates it).
  • --cors '*' β€” comma-separated whitelist of origins for CORS, aka cross-origin resource sharing (empty or * means allow all).
  • --host-whitelist '*' β€” acceptable hostnames from HTTP client requests, if the server isn't secure (empty or * means allow all).

πŸŽ€ Auth πŸŽ€

  • --auth-token 'simple' β€” specify a v3 authentication token type and its options, either 'simple' or 'jwt'.
  • --bcrypt-cost 10 β€” specify the cost / strength of the bcrypt algorithm for hashing auth passwords. valid values are between 4 and 31.
  • --auth-token-ttl 300 β€” time, in seconds, of the auth-token-ttl.

πŸŽ€ Profiling and Monitoring πŸŽ€

she's not just pretty, she's observable πŸ“ŠπŸ’–

  • --enable-pprof 'false' β€” enable runtime profiling data via the HTTP server. the address lives at client URL + "/debug/pprof/".
  • --metrics 'basic' β€” set the level of detail for exported metrics. specify 'extensive' to include histogram metrics.
  • --listen-metrics-urls '' β€” list of URLs to listen on for the metrics and health endpoints.

πŸŽ€ Logging πŸŽ€

  • --logger 'capnslog' β€” specify 'zap' for structured logging, or 'capnslog'. [WARN] 'capnslog' will be deprecated in v3.5. ⚠️
  • --log-outputs 'default' β€” specify 'stdout' or 'stderr' to skip journald logging even when running under systemd, or a list of comma separated output targets.
  • --log-level 'info' β€” configures the log level. only supports debug, info, warn, error, panic, or fatal.

πŸŽ€ v2 Proxy (to be deprecated in v4) πŸŽ€

she's on her way out but we still love her πŸ₯²

  • --proxy 'off' β€” proxy mode setting, one of 'off', 'readonly' or 'on'.
  • --proxy-failure-wait 5000 β€” time, in milliseconds, an endpoint gets held in a failed state.
  • --proxy-refresh-interval 30000 β€” time, in milliseconds, of the endpoints refresh interval.
  • --proxy-dial-timeout 1000 β€” time, in milliseconds, for a dial to timeout.
  • --proxy-write-timeout 5000 β€” time, in milliseconds, for a write to timeout.
  • --proxy-read-timeout 0 β€” time, in milliseconds, for a read to timeout.

πŸŽ€ Experimental feature πŸŽ€

"experimental" is the technical term for "we're trying something, wish us luck" πŸ™ˆβœ¨

  • --experimental-initial-corrupt-check 'false' β€” enable to check for data corruption before serving any client/peer traffic.
  • --experimental-corrupt-check-time '0s' β€” duration of time between cluster corruption check passes.
  • --experimental-enable-v2v3 '' β€” serve v2 requests through the v3 backend under a given prefix.
  • --experimental-backend-bbolt-freelist-type 'array' β€” ExperimentalBackendFreelistType specifies the type of freelist the boltdb backend uses (array and map are the supported types).
  • --experimental-enable-lease-checkpoint 'false' β€” ExperimentalEnableLeaseCheckpoint enables the primary lessor to persist lease remainingTTL so long lived leases don't auto-renew indefinitely.
  • --experimental-compaction-batch-limit 1000 β€” ExperimentalCompactionBatchLimit sets the maximum revisions deleted in each compaction batch.
  • --experimental-peer-skip-client-san-verification 'false' β€” skip verification of the SAN field in the client certificate for peer connections.
  • --experimental-watch-progress-notify-interval '10m' β€” duration of periodical watch progress notification.
  • --experimental-warning-apply-duration '100ms' β€” a warning is generated if requests take longer than this duration.

πŸŽ€ Unsafe feature πŸŽ€

  • --force-new-cluster 'false' β€” force the creation of a new one-member cluster.
⚠️ CAUTIOUS with unsafe flag! It may break the guarantees given by the consensus protocol! seriously bestie, this one is not a vibe, it's a threat πŸ’€

πŸŽ€ TO BE DEPRECATED πŸŽ€

  • --debug 'false' β€” enable debug-level logging for etcd. [WARN] will be deprecated in v3.5. use '--log-level=debug' instead.
  • --log-package-levels '' β€” specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG').

🌟 SEE ALSO 🌟

ectdctl(1), /usr/share/doc/etcd-server/op-guide/configuration.md.gz

(no i'm not fixing the typo in ectdctl(1), she's part of the lore now πŸ’€)


and that's the whole page bestie!! this is 3.4.23, dated January 2022, from the etcd(1) manual β€” go be highly available, you absolute icon 🫢✨

πŸ“¦ where this page comes from