Scroll to navigation

ETCDCTL(1) User Commands ETCDCTL(1)

NAME

etcdctl - A simple command line client for etcd.

WARNING

Set environment variable ETCDCTL_API=3 to use v3 API or ETCDCTL_API=2 to use v2 API.

USAGE

etcdctl [options] command [command options] [arguments...]

COMMANDS V3

Disarms all alarms
Lists all alarms
auth disable
Disables authentication
auth enable
Enables authentication
Check the performance of the etcd cluster
Compacts the event history in etcd
Defragments the storage of the etcd members with given endpoints
Removes the specified key or range of keys [key, range_end)
Observes and participates in leader election
Prints the KV history hash for each endpoint in --endpoints
Checks the healthiness of endpoints specified in `--endpoints` flag
Prints out the status of endpoints specified in `--endpoints` flag
Gets the key or a range of keys
Help about any command
Creates leases
Keeps leases alive (renew)
List all active leases
Revokes leases
Get lease information
Acquires a named lock
Makes a mirror at the destination etcd cluster
member add
Adds a member into the cluster
member list
Lists all members in the cluster
member remove
Removes a member from the cluster
member update
Updates a member in the cluster
Migrates keys in a v2 store to a mvcc store
Transfers leadership to another etcd cluster member.
Puts the given key into the store
role add
Adds a new role
role delete
Deletes a role
role get
Gets detailed information of a role
role grant-permission
Grants a key to a role
role list
Lists all roles
role revoke-permission
Revokes a key from a role
Restores an etcd member snapshot to an etcd directory
Stores an etcd node backend snapshot to a given file
Gets backend snapshot status of a given file
Txn processes all the requests in one transaction
user add
Adds a new user
user delete
Deletes a user
user get
Gets detailed information of a user
user grant-role
Grants a role to a user
user list
Lists all users
user passwd
Changes password of user
user revoke-role
Revokes a role from a user
Prints the version of etcdctl
Watches events stream on keys or prefixes

OPTIONS V3

verify certificates of TLS-enabled secure servers using this CA bundle
identify secure client using this TLS certificate file
timeout for short running command (excluding dial timeout)
enable client-side debug logging
dial timeout for client connections
domain name to query for SRV records describing cluster endpoints
gRPC endpoints
help for etcdctl
print byte strings as hex encoded strings
accept insecure SRV records describing cluster endpoints
skip server certificate verification (CAUTION: this option should be enabled only for testing purposes)
disable transport security for client connections
keepalive time for client connections
keepalive timeout for client connections
identify secure client using this TLS key file
username[:password] for authentication (prompt if password is not supplied)
set the output format (fields, json, protobuf, simple, table)

COMMANDS V2

backup an etcd directory
check the health of the etcd cluster
make a new key with a given value
make a new directory
remove a key or a directory
removes the key if it is an empty directory or a key-value pair
retrieve the value of a key
retrieve a directory
set the value of a key
create a new directory or update an existing directory TTL
update an existing key with a given value
update an existing directory
watch a key for changes
watch a key for changes and exec an executable
member add, remove and list subcommands
user add, grant and revoke subcommands
role add, grant and revoke subcommands
overall auth controls
Shows a list of commands or help for one command

OPTIONS V2

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

SEE ALSO

ectd(1)

October 2020 3.3.25