etcd增删改查

![image-20191209191301618](C:\Users\AneroKissinger\AppData\Roaming\Typora\typora-user-images\image-20191209191301618.png

root@instance-emh5jlpa:~# etcdctl put /user/101/name xiahualou
OK
root@instance-emh5jlpa:~# etcdctl get /user/101
root@instance-emh5jlpa:~# etcdctl get /user/101/name
/user/101/name
xiahualou
root@instance-emh5jlpa:~# etcdctl get /user/101 --prefix //获取所有以/user/101为前缀的
/user/101/name
xiahualou
root@instance-emh5jlpa:~# etcdctl del /user/101 --prefix //删除所有以/user/101为前缀的
1

![image-20191209191301618](C:\Users\AneroKissinger\AppData\Roaming\Typora\typora-user-images\image-20191209191301618.png

root@instance-emh5jlpa:~# etcdctl put /user/101/name xiahualou
OK
root@instance-emh5jlpa:~# etcdctl get /user/101
root@instance-emh5jlpa:~# etcdctl get /user/101/name
/user/101/name
xiahualou
root@instance-emh5jlpa:~# etcdctl get /user/101 --prefix //获取所有以/user/101为前缀的
/user/101/name
xiahualou
root@instance-emh5jlpa:~# etcdctl del /user/101 --prefix //删除所有以/user/101为前缀的
1




posted @ 2019-12-20 00:41  离地最远的星  阅读(302)  评论(0编辑  收藏  举报