1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 11:02:08 +02:00
tldr/pages/common/etcdctl.md
bl-ue 8ebd171d6f
*: fix typos reported by Hunspell (#5848)
Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com>
Co-authored-by: Seth Falco <seth@falco.fun>
Co-authored-by: Patrice Denis <patricedenis@users.noreply.github.com>
2021-05-20 16:13:41 -04:00

805 B

etcdctl

CLI interface for interacting with etcd, a highly-available key-value pair store. More information: https://etcd.io/docs/latest/dev-guide/interacting_v3/.

  • Display the value associated with a specified key:

etcdctl get {{my/key}}

  • Store a key-value pair:

etcdctl put {{my/key}} {{my_value}}

  • Delete a key-value pair:

etcdctl del {{my/key}}

  • Store a key-value pair, reading the value from a file:

etcdctl put {{my/file}} < {{path/to/file.txt}}

  • Save a snapshot of the etcd keystore:

etcdctl snapshot save {{path/to/snapshot.db}}

  • Restore a snapshot of an etcd keystore (restart the etcd server afterwards):

etcdctl snapshot restore {{path/to/snapshot.db}}

  • Add a user:

etcdctl user add {{my_user}}

  • Watch a key for changes:

etcdctl watch {{my/key}}