Git Product home page Git Product logo

etcdctl's Introduction

etcdctl

Build Status

etcdctl is a command line client for etcd. It can be used in scripts or for administrators to explore an etcd cluster.

Getting etcdctl

The latest release is available as a binary at Github along with etcd.

You can also build etcdctl from source:

./build

Usage

Key Value Storage

Setting a key on /foo/bar:

etcdctl set /foo/bar "Hello world"
Hello world

Getting a key:

etcdctl get /foo/bar
Hello world

Deleting a key:

etcdctl delete /foo/bar
Hello world

Tailing a key:

etcdctl watch /foo/bar -f
Hello world
.... client hangs forever until ctrl+C printing values as key change

Sets

etcdctl implements sets on top of the key-value store that etcd provides. These are useful for storing lists of unique items. A common use-case is servers of a particular type that register themselves under an etcd key, so that they can be detected and used by clients.

Adding members to a set:

etcdctl sadd /queues amqp://user:password@rabbitmq1
amqp://user:password@rabbitmq1
etcdctl sadd /queues amqp://user:password@rabbitmq2 --ttl=60
amqp://user:password@rabbitmq2

List all members:

etcdctl smembers /queues
amqp://user:password@rabbitmq1
amqp://user:password@rabbitmq2

To delete a member:

etcdctl sdel /queues amqp://user:password@rabbitmq1

Return Codes

0 Success

1 Malformed etcdctl arguments

2 Failed to connect to host

3 Failed to auth (client cert rejected, ca validation failure, etc)

4 400 error from etcd

5 500 error from etcd

Project Details

Versioning

etcdctl uses semantic versioning. Releases will follow lockstep with the etcd release cycle.

License

etcdctl is under the Apache 2.0 license. See the LICENSE file for details.

etcdctl's People

Contributors

emilisto avatar xiang90 avatar philips avatar polvi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.