etcdctl : No help topic for 'put'

Created on 24 Nov 2016  Â·  5Comments  Â·  Source: etcd-io/etcd

[tao@MoeLove etcd-v3.1.0-rc.1-linux-amd64]$ ETCDCTL_API=3 
[tao@MoeLove etcd-v3.1.0-rc.1-linux-amd64]$ ./etcdctl  put foo "bar"
No help topic for 'put'
[tao@MoeLove etcd-v3.1.0-rc.1-linux-amd64]$ ./etcdctl  -h
NAME:
   etcdctl - A simple command line client for etcd.

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

VERSION:
   3.1.0-rc.1

COMMANDS:
     backup          backup an etcd directory
     cluster-health  check the health of the etcd cluster
     mk              make a new key with a given value
     mkdir           make a new directory
     rm              remove a key or a directory
     rmdir           removes the key if it is an empty directory or a key-value pair
     get             retrieve the value of a key
     ls              retrieve a directory
     set             set the value of a key
     setdir          create a new directory or update an existing directory TTL
     update          update an existing key with a given value
     updatedir       update an existing directory
     watch           watch a key for changes
     exec-watch      watch a key for changes and exec an executable
     member          member add, remove and list subcommands
     user            user add, grant and revoke subcommands
     role            role add, grant and revoke subcommands
     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: 2s)
   --total-timeout value            timeout for the command execution (except watch) (default: 5s)
   --help, -h                       show help
   --version, -v                    print the version

All of the project's documentations used etcdctl put command for examples like this https://github.com/coreos/etcd/blob/master/etcdctl/README.md. But when I used, I got an error. No help topic for 'put'. I can use set command correctly.

I want to know if the document is out of sync or I'm wrong ?

I found etcdctl/ctlv2 has set_command.go and etcdctl/ctlv3 has put_command.go in source code.

Most helpful comment

[tao@MoeLove etcd-v3.1.0-rc.1-linux-amd64]$ ETCDCTL_API=3

This is wrong.

You should do export ETCDCTL_API=3

All 5 comments

@tao12345666333 You need ETCDCTL_API=3 ./etcdctl put --help

[tao@MoeLove etcd-v3.1.0-rc.1-linux-amd64]$ ETCDCTL_API=3

This is wrong.

You should do export ETCDCTL_API=3

@gyuho @xiang90 Thank you. It's my wrong.

赞

$ ETCDCTL_API=3 ./etcdctl put foo bar
OK

or

export ETCDCTL_API=3
then
./etcdctl put foo bar

that is work for me

Was this page helpful?
0 / 5 - 0 ratings