docker安装etcd
docker run --name etcd -d -p 2379:2379 -p 2380:2380 -e ALLOW_NONE_AUTHENTICATION=yes bitnami/etcd:3.3.11 etcd
etcd客户端安装
https://github.com/etcd-io/etcd/releases
客户端命令测试测试
- 设置/更新key&value
./etcdctl put name user.name
- 获取key&value
./etcdctl get name
- 只获取value
./etcdctl get name --print-value-only
- 获取前缀key&value
./etcdctl get name --prefix
- 删除key
./etcdctl del name
- 监听key变化
./etcdctl watch name