通过不同的设置api 版本环境变量,支持的命令行不同。

Interacting with etcd:  https://coreos.com/etcd/docs/latest/dev-guide/interacting_v3.html

1.  未设置 ETCDCTL_API 时,支持的命令

  缺省使用  ETCDCTL_API=2

[root@vStack etcd-v3.0.15-linux-amd64]# ./etcdctl help
NAME:
  etcdctl - A simple command line client for etcd.

USAGE:
  etcdctl [global options] command [command options] [arguments...]

VERSION:
  3.0.15

COMMANDS:
  1. backup                backup an etcd directory
  2. cluster-health           check the health of the etcd cluster
  3. mk                 make a new key with a given value
  4. mkdir               make a new directory
  5. rm                 remove a key or a directory
  6. rmdir               removes the key if it is an empty directory or a key-value pair
  7. get                  retrieve the value of a key
  8. ls                 retrieve a directory
  9. set                  set the value of a key
  10. setdir              create a new directory or update an existing directory TTL
  11. update                update an existing key with a given value
  12. updatedir              update an existing directory
  13. watch               watch a key for changes
  14. exec-watch           watch a key for changes and exec an executable
  15. member                member add, remove and list subcommands
  16. import               import a snapshot to a cluster
  17. user                user add, grant and revoke subcommands
  18. role               role add, grant and revoke subcommands
  19. auth               overall auth controls

GLOBAL OPTIONS:
--debug                    output cURL commands which can be used to reproduce the request
--no-sync                     don't synchronize cluster information before sending request
--output simple, -o simple            output response in the given format (simple, `extended` or `json`) (default: "simple")
--discovery-srv value, -D value         domain name to query for SRV records describing cluster endpoints
--insecure-discovery             accept insecure SRV records describing cluster endpoints
--peers value, -C value             DEPRECATED - "--endpoints" should be used instead
--endpoint value               DEPRECATED - "--endpoints" should be used instead
--endpoints value               a comma-delimited list of machine addresses in the cluster (default: "http://127.0.0.1:2379,http://127.0.0.1:4001")
--cert-file value                 identify HTTPS client using this SSL certificate file
--key-file value                  identify HTTPS client using this SSL key file
--ca-file value                  verify certificates of HTTPS-enabled servers using this CA bundle
--username value, -u value            provide username[:password] and prompt if password is not supplied.
--timeout value                 connection timeout per request (default: 1s)
--total-timeout value             timeout for the command execution (except watch) (default: 5s)
--help, -h                      show help
--version, -v                  print the version

2. 设置 ETCDCTL_API=3 时,支持的命令

export ETCDCTL_API=3

[root@vStack etcd-v3.0.15-linux-amd64]# ./etcdctl --help

NAME:
  etcdctl - A simple command line client for etcd3.

USAGE:
  etcdctl

VERSION:
  3.0.15

COMMANDS:
  1. get             Gets the key or a range of keys

      etcdctl get [options] <key> [range_end]

      OPTIONS:

        --consistency="l"        Linearizable(l) or Serializable(s)
        --from-key[=false]        Get keys that are greater than or equal to the given key
        --keys-only[=false]       Get only the keys
        --limit=0             Maximum number of results
        --order=""           Order of results; ASCEND or DESCEND
        --prefix[=false]          Get keys with matching prefix
        --rev=0               Specify the kv revision
        --sort-by=""            Sort target; CREATE, KEY, MODIFY, VALUE, or VERSION


  2. put             Puts the given key into the store
  3. del              Removes the specified key or range of keys [key, range_end)
  4. txn             Txn processes all the requests in one transaction
  5. compaction           Compacts the event history in etcd  。 etcd支持历史数据的读取,为了避免积累无限历史数据。compacting操作后,etcd将删除历史的版本数据,释放资源为后面使用。在compacted 版本前的数据都将无效。

      

  6. alarm disarm         Disarms all alarms
  7. alarm list           Lists all alarms
  8. defrag             Defragments the storage of the etcd members with given endpoints
  9. endpoint health       Checks the healthiness of endpoints specified in `--endpoints` flag
  10. endpoint status        Prints out the status of endpoints specified in `--endpoints` flag
  11. watch            Watches events stream on keys or prefixes
  12. version             Prints the version of etcdctl
  13. lease grant          Creates leases
  14. lease revoke         Revokes leases
  15. lease keep-alive      Keeps leases alive (renew)
  16. member add         Adds a member into the cluster
  17. member remove       Removes a member from the cluster
  18. member update        Updates a member in the cluster
  19. member list          Lists all members in the cluster
  20. snapshot save        Stores an etcd node backend snapshot to a given file
  21. snapshot restore      Restores an etcd member snapshot to an etcd directory
  22. snapshot status       Gets backend snapshot status of a given file
  23. make-mirror         Makes a mirror at the destination etcd cluster
  24. migrate           Migrates keys in a v2 store to a mvcc store
  25. lock              Acquires a named lock
  26. elect             Observes and participates in leader election
  27. auth enable          Enables authentication
  28. auth disable         Disables authentication
  29. user add          Adds a new user
  30. user delete         Deletes a user
  31. user get           Gets detailed information of a user
  32. user list           Lists all users
  33. user passwd        Changes password of user
  34. user grant-role       Grants a role to a user
  35. user revoke-role      Revokes a role from a user
  36. role add           Adds a new role
  37. role delete            Deletes a role
  38. role get            Gets detailed information of a role
  39. role list           Lists all roles
  40. role grant-permission   Grants a key to a role
  41. role revoke-permission   Revokes a key from a role
  42. help             Help about any command

OPTIONS:  
  --cacert=""                 verify certificates of TLS-enabled secure servers using this CA bundle
  --cert=""                 identify secure client using this TLS certificate file
  --command-timeout=5s          timeout for short running command (excluding dial timeout)
  --dial-timeout=2s               dial timeout for client connections
  --endpoints=[127.0.0.1:2379]        gRPC endpoints
  --hex[=false]                 print byte strings as hex encoded strings
  --insecure-skip-tls-verify[=false]     skip server certificate verification
  --insecure-transport[=true]        disable transport security for client connections
  --key=""                  identify secure client using this TLS key file
  --user=""                  username[:password] for authentication (prompt if password is not supplied)
  -w, --write-out="simple"          set the output format (simple, json, etc..)

etcdctl 命令介绍的更多相关文章

  1. 12个Linux进程管理命令介绍(转)

    12个Linux进程管理命令介绍 [日期:2015-06-02] 来源:Linux中国  作者:Linux [字体:大 中 小]   执行中的程序在称作进程.当程序以可执行文件存放在存储中,并且运行的 ...

  2. 2.SDK目录结构和adb工具及命令介绍

    安卓开发学习笔记 1.安卓开发之环境搭建 2.SDK目录结构和adb工具及命令介绍 1.SDK目录介绍: ******************************** add-ons:Androi ...

  3. git各种命令介绍以及碰到的各种坑

    一.各种命令介绍: git pull:从其他的版本库(既可以是远程的也可以是本地的)将代码更新到本地,例如:'git pull origin master'就是将origin这个版本库的代码更新到本地 ...

  4. tar.xz如何解压:linux和windows下tar.xz解压命令介绍

    在linux下怎么解压和压缩tar.xz文件? (本文由www.169it.com搜集整理) 在linux下解压tar.xz文件步骤 1 2 # xz -d ***.tar.xz  //先解压xz # ...

  5. 查看MySQL数据库表的命令介绍

    如果需要查看MySQL数据库中都有哪些MySQL数据库表,应该如何实现呢?下面就为您介绍查看MySQL数据库表的命令,供您参考. 进入MySQL Command line client下查看当前使用的 ...

  6. Docker学习总结之Run命令介绍

    Docker学习总结之Run命令介绍 本文由Vikings(http://www.cnblogs.com/vikings-blog/) 原创,转载请标明.谢谢! 在使用Docker时,执行最多的命令某 ...

  7. maven常用命令介绍

    mvn 3.0.4 创建maven项目命令  mvn  archetype:generate   -DgroupId=damocles-autocredit -DartifactId=damocles ...

  8. [转帖]十二 个经典 Linux 进程管理命令介绍

    https://www.cnblogs.com/swordxia/p/4550825.html 接了 http referer 头 没法显示图片 可以去原始blog 里面去查看.   随笔- 109  ...

  9. Pacman命令介绍

    用pacman很久了,一直没有深入去研究到底它包含多少神秘的力量,每次都是pacman -Syu就简单的把所有升级更新问题搞定实在是让笔者懒惰了很多.不过也正是因为pacman的简单让笔者爱不释手,同 ...

随机推荐

  1. 如何提高Linux操作系统的安全性 转自https://yq.aliyun.com/articles/24251?spm=5176.100239.blogcont24250.7.CfBYE9

    摘要: Linux系统不论在功能上.价格上或性能上都有很多优点,但作为开放式操作系统,它不可避免地存在一些安全隐患.关于如何解决这些隐患,为应用提供一个安全的操作平台,本文会告诉你一些最基本.最常用, ...

  2. springmvc+spring-security+mybatis +redis +solar框架抽取

    参考文章:Spring MVC 3 深入总结: 第二章 Spring MVC入门 —— 跟开涛学SpringMVC 参考博客:http://www.cnblogs.com/liukemng/categ ...

  3. Rails ---> routes.rb 详解

    理解路由的目的 看懂routes.rb文件中的代码 使用经典的hash风格或者现在比较流行的Restful风格构造你自己的路径 断定一个路径会映射到哪一个controller和action 路由的双重 ...

  4. [LeetCode] 10. Regular Expression Matching

    Implement regular expression matching with support for '.' and '*'. DP: public class Solution { publ ...

  5. HTML5精美网站模板分享

    1. http://newweb.top/ 2. http://newweb.top/Templates/agency-gh-pages/index.html

  6. SQL Server替换特殊字符

    1.查找特殊字符的ASCII码,在这里当然能够看到这个特出字符的模样,可用函数取出这个特殊字符进行复制,下面的取值为9 Select ascii(' ') 2.根据ASCII码值替换特殊字符 Upda ...

  7. 大气散射 GPU Gems2 Chapter 16. Accurate Atmospheric Scattering

    效果图 这次先上效果图*4 散射概念 光线击中空气中的微小颗粒后的偏折导致了光线的散射.我们看到的阳光应该是由视线上的散射在视线方向上的集合.如果由地面的反射,还要加上经过散射计算的地面反射. Ray ...

  8. Windows消息机制详解

    消息是指什么?      消息系统对于一个win32程序来说十分重要,它是一个程序运行的动力源泉.一个消息,是系统定义的一个32位的值,他唯一的定义了一个事件,向 Windows发出一个通知,告诉应用 ...

  9. [JavaScript]JS由来

    JavaScript最早由Netscape公司开发 JavaScript的发展历程 我们知道Windows桌面程序是可以交互的,用户可以点击菜单.按钮.下拉列表等控件,并通过消息机制来响应用户操作. ...

  10. jQuery中attr()、prop()、data()用法及区别

    .attr(),此方法从jq1.0开始一直存在,官方文档写的作用是读/写DOM的attribute值,其实1.6之前有时候是attribute,有时候又是property..prop(),此方法jq1 ...