Etcd: How to install *just* etcdctl tool?

Created on 13 Mar 2017  路  6Comments  路  Source: etcd-io/etcd

Hi! I'm wondering how I can install only the etcdctl tool? I don't want to install the etcd service, only the client tool. Is there a way to do this?

Thanks in advance!
-jay

Most helpful comment

on MacBook try -
brew install etcd

All 6 comments

We don't ship separate binary for etcdctl. Currently easiest way is just untar release binaries from https://github.com/coreos/etcd/releases and just pick the etcdctl. Or if you want to build on your own, here's how we build etcdctl binary https://github.com/coreos/etcd/blob/master/build#L39.

go get github.com/coreos/etcd/cmd/etcdctl will install the latest etcdctl, but it'll build from master, so don't expect it to be stable.

By now this is go get github.com/coreos/etcd/etcdctl.

You can also do:

go get github.com/coreos/etcd/etcdctl
cd <go-dir>/src/github.com/coreos/etcd/
git checkout -b v3.3.4
CFLAGS="-Wno-error" go install .

on MacBook try -
brew install etcd

By now this is go get github.com/coreos/etcd/etcdctl.

You can also do:

go get github.com/coreos/etcd/etcdctl
cd <go-dir>/src/github.com/coreos/etcd/
git checkout -b v3.3.4
CFLAGS="-Wno-error" go install .

what about the conflict of the version. will it create any issue like your etcd service is running on older version but we have installed new version of etcdctl?

  1. In etcd-3.5 you will be able to install etcdctl alone:
    go get go.etcd.io/etcdctl/v3

  2. Majority of etcdctl commands work over the network protocol [exceptions etcdctl snapshot & etcdctl migrate]. They are compatible in practice as long as you don't use a new future implemented in e.g. 3.4 server, client, etcdctl, but later you are trying to use it through etcdctl 3.4 client, but on etcd server 3.2.

Was this page helpful?
0 / 5 - 0 ratings