Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

41
etcdctl Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# etcdctl
> Interact 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}}`