From 244a7b1c707ca3853ab2aa6d9509352d21ba0023 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Fri, 11 Dec 2020 16:29:31 -0500 Subject: [PATCH] etcdctl: add page (#5006) --- pages/common/etcdctl.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pages/common/etcdctl.md diff --git a/pages/common/etcdctl.md b/pages/common/etcdctl.md new file mode 100644 index 0000000000..5021ee6fb1 --- /dev/null +++ b/pages/common/etcdctl.md @@ -0,0 +1,37 @@ +# etcdctl + +> CLI interface for interacting with `etcd`, a highly-available key-value pair store. +> Etcd stores data in hierarchically organized directories, as in a standard filesystem. +> More information: . + +- 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}}`