https://github.com/escalopa/etcd-playground
An ETCD playground to learn it more in depth
https://github.com/escalopa/etcd-playground
Last synced: about 2 months ago
JSON representation
An ETCD playground to learn it more in depth
- Host: GitHub
- URL: https://github.com/escalopa/etcd-playground
- Owner: escalopa
- License: mit
- Created: 2024-05-01T13:22:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-05T14:35:18.000Z (about 2 years ago)
- Last Synced: 2025-12-26T23:55:56.023Z (6 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# etcd-playground 🔏
An ETCD playground to learn it more in depth
## Usage 🖊
1) Start the cluster
```bash
docker compose up -d
```
2) Export endpoints to a gloabl var to be used in the CLI commands
```bash
export ETCD_ENDPOINTS="localhost:32771,localhost:32772,localhost:32773"
```
3) Put KV
```bash
etcdctl --endpoints="$ETCD_ENDPOINTS" put foo bar --prev-kv --write-out=json | jq
```
4) Get KV
```bash
etcdctl --endpoints="$ETCD_ENDPOINTS" get --prefix foo --write-out=json | jq
```
5) Watch KV
```bash
etcdctl --endpoints="$ETCD_ENDPOINTS" watch foo --prev-kv --write-out=json | jq
```