-
Notifications
You must be signed in to change notification settings - Fork 67
Home
consul-cli is a command line interface to the Consul HTTP API
See one of:
- Common Command Line Options
- ACL Commands
- Agent Commands
- Check Commands
- Health Commands
- KV Commands
- Service Commands
- Session Commands
- Status Commands
-
--consul
Address of the Consul agent in the formhostname:port
. The default is127.0.0.1:8500
. Can also be set with the environment variableCONSUL_HTTP_ADDR
-
--ssl
Use HTTPS when connecting to the Consul agent. The default isfalse
. Can also be set with the environment variableCONSUL_HTTP_SSL
-
--ssl-verify
Verify certificates when connecting via SSL. The default istrue
. Can also be set with the environment variableCONSUL_HTTP_SSL_VERIFY
-
--ssl-cert
Path to an SSL client certificate to use to authenticate to the consul server. Useful if the consul server "verify_incoming" option is set. -
--ssl-ca-cert
Path to a CA certificate file, containing one or more CA certificates to use to validate the certificate sent by the consul server to us. This is a handy alternative to setting --ssl-verify=false if you are using your own CA. -
--auth
The basic authentication username (and optional password), separated by a colon. Can also be set with the environment variableCONSUL_HTTP_AUTH
-
--token
The Consul API token. Can also be set with the environment variableCONSUL_HTTP_TOKEN
-
--datacenter
The data center to query. By default the data center of the agent is used.
Interface to the /v1/acl endpoint
- acl-clone - Create a new token from an existing one
- acl-create - Create an ACL
- acl-destroy - Destroy an ACL
- acl-info - Query an ACL token
- acl-list - List active ACL tokens
- acl-update - Update an ACL
Interface to the /v1/agent endpoint
- agent-checks - Get the checks the agent is managing
- agent-force-leave - Force the removal of a node
- agent-join - Trigger the local agent to join a node
- agent-maintenance - Manage node maintenance mode
- agent-members - Get the members as seen by the serf agent
- agent-self - Get the node configuration
- agent-services - Get the services the agent is managing
Interface to the /v1/agent/check endpoint
- check-deregister - Remove a check from the agent
- check-fail - Mark a local check as critical
- check-pass - Mark a local check as passing
- check-register - Register a new local check
- check-warn - Mark a local check as warning
Interface to the /v1/health endpoint
- health-checks - Get the health checks for a service
- health-node - Get the health info for a node
- health-service - Get nodes and health info for a service
- health-state - Get the checks in a given state
Interface to the /v1/kv endpoint
- kv-delete - Delete a path
- kv-lock - Lock a node
- kv-read - Read a value
- kv-unlock - Unlock a node
- kv-watch - Watch a node for changes
- kv-write - Write a value
Interface to the /v1/agent/service endpoint
- service-deregister - Remove a service from the agent
- service-maintenance - Manage maintenance mode on a service
- service-register - Register a new local service
Interface to the /v1/session endpoint
- session-create - Create a session
- session-destroy - Destroy a session
- session-info - Get information on a session
- session-list - List active sessions for a datacenter
- session-node - Get active sessions for a node
- session-renew - Renew the given session
Interface to the /v1/status endpoint
- status-leader - Get the current Raft leader
- status-peers - Get the current Raft peer set