etcdctl 是 etcd 的命令行客户端工具,用于管理和操作 etcd 集群。以下是 etcdctl 3.4 的基本操作:

  1. 查看 etcd 集群中的 key-value 对:
etcdctl get key

其中,key 是要查看的 key 名称。

  1. 设置 etcd 集群中的 key-value 对:
etcdctl put key value

其中,key 是要设置的 key 名称,value 是要设置的值。

  1. 删除 etcd 集群中的 key-value 对:
etcdctl del key

其中,key 是要删除的 key 名称。

  1. 列出 etcd 集群中的所有 key:
etcdctl ls
  1. 监听 etcd 集群中 key 的变化:
etcdctl watch key

其中,key 是要监听的 key 名称。

  1. 在 etcd 集群中创建目录:
etcdctl mkdir dir

其中,dir 是要创建的目录名称。

  1. 在 etcd 集群中删除目录:
etcdctl rmdir dir

其中,dir 是要删除的目录名称。

以上是 etcdctl 3.4 的基本操作,可以帮助管理员管理和操作 etcd 集群。需要注意的是,etcdctl 3.4 的命令可能与 etcdctl 2.x 的命令略有不同,具体操作请查看官方文档。

etcdctl 3.4 使用指南:基本操作详解

原文地址: https://www.cveoy.top/t/topic/kQC8 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录