您的位置:首页 > 其它

etcdctl exec-watch 命令使用介绍

2017-12-06 13:08 344 查看
etcdctl exec-watch 命令可以检测某个key的值的改变,并执行相应的命令,帮助文档显示的用法:

[root@localhost ~]# etcdctl exec-watch --help

USAGE:
etcdctl exec-watch [command options] <key> <command> [args...]



但实际上应该是:
etcdctl exec-watch [command options] <key> -- <command> [args...]

也就是 <command> 之前需要添加两个 -

例如:

[root@localhost ~]# etcdctl exec-watch /hello -- /bin/echo 'hello etcd'
hello etcd
hello etcd
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: