欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

etcd操作

程序员文章站 2022-07-13 22:11:06
...

查看key列表

etcdctl ls

写入一个key

etcdctl set foo bar
etcdctl set /coreos.com/network/config '{"Network": "172.7.0.0/16", "Backend": {"Type": "host-gw"}}'

读取key

etcdctl get foo
etcdctl get /coreos.com/network/config

删除key

etcdctl rm foo

增加一个节点

新加的节点取名为 infra3, peerURLs 是 https://10.0.1.13:2380

etcdctl member add infra3 https://10.0.1.13:2380

删除一个节点

etcdctl member remove a8266ecf031671f3
相关标签: etcd