etcdctl exec-watch 命令使用介绍

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhang197093/article/details/78729541

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





猜你喜欢

转载自blog.csdn.net/zhang197093/article/details/78729541
今日推荐