注册 登录
查看: 98|回复: 0

etcdctl put 使用

[复制链接]

54

主题

56

帖子

1143

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1143
发表于 2018-8-9 17:40:48 | 显示全部楼层 |阅读模式
  1. NAME:
  2.         put - Puts the given key into the store

  3. USAGE:
  4.         etcdctl put [options] <key> <value> (<value> can also be given from stdin)

  5. DESCRIPTION:
  6.         Puts the given key into the store.

  7.         When <value> begins with '-', <value> is interpreted as a flag.
  8.         Insert '--' for workaround:

  9.         $ put <key> -- <value>
  10.         $ put -- <key> <value>

  11.         If <value> isn't given as a command line argument and '--ignore-value' is not specified,
  12.         this command tries to read the value from standard input.

  13.         If <lease> isn't given as a command line argument and '--ignore-lease' is not specified,
  14.         this command tries to read the value from standard input.

  15.         For example,
  16.         $ cat file | put <key>
  17.         will store the content of the file to <key>.

  18. OPTIONS:
  19.       --ignore-lease[=false]    updates the key using its current lease
  20.       --ignore-value[=false]    updates the key using its current value
  21.       --lease="0"               lease ID (in hexadecimal) to attach to the key
  22.       --prev-kv[=false]         return the previous key-value pair before modification

  23. GLOBAL OPTIONS:
  24.       --cacert=""                               verify certificates of TLS-enabled secure servers using this CA bundle
  25.       --cert=""                                 identify secure client using this TLS certificate file
  26.       --command-timeout=5s                      timeout for short running command (excluding dial timeout)
  27.       --debug[=false]                           enable client-side debug logging
  28.       --dial-timeout=2s                         dial timeout for client connections
  29.   -d, --discovery-srv=""                        domain name to query for SRV records describing cluster endpoints
  30.       --endpoints=[127.0.0.1:2379]              gRPC endpoints
  31.       --hex[=false]                             print byte strings as hex encoded strings
  32.       --insecure-discovery[=true]               accept insecure SRV records describing cluster endpoints
  33.       --insecure-skip-tls-verify[=false]        skip server certificate verification
  34.       --insecure-transport[=true]               disable transport security for client connections
  35.       --keepalive-time=2s                       keepalive time for client connections
  36.       --keepalive-timeout=6s                    keepalive timeout for client connections
  37.       --key=""                                  identify secure client using this TLS key file
  38.       --user=""                                 username[:password] for authentication (prompt if password is not supplied)
  39.   -w, --write-out="simple"                      set the output format (fields, json, protobuf, simple, table)
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回列表 返回顶部