etcdtool icon indicating copy to clipboard operation
etcdtool copied to clipboard

support for etcd v3

Open ploef opened this issue 9 years ago • 10 comments
trafficstars

Hi,

Are there any plans for supporting etcd v3?

Kind regards, Peter

ploef avatar Nov 05 '16 11:11 ploef

I could look into it, may I ask what is your main use-case for using etcdtool. Also do you have suggestions for improvements?

ake-persson avatar Nov 05 '16 14:11 ake-persson

I think that would be great. As I understand it, etcd v3 is the version they ask us to use now. Looking for a way to import configuration files (YAML, from git repository) into etcd I stumbled upon etcdtool. As far as I know it's the only tool that makes this possible.

ploef avatar Nov 05 '16 17:11 ploef

I'm not sure how useful import/export JSON/YAML/TOML is for etcd v3, since it doesn't support nested nodes anymore i.e. it's a flat key/value store.

You could simulate a nested structure with a separator, but I'm not sure this make's much sense.

I think the only functionality that would make any sense for v3 is maybe export/import.

ake-persson avatar Nov 25 '16 08:11 ake-persson

+1- I'd love to use this in conjunction with etcd-operators in kubernetes to backup both etcdv2 and etcdv3.

ipfaffy avatar Apr 07 '17 17:04 ipfaffy

Does import/export work with etcd3? I was trying it out and it appears to post using the v2 data store. I want to be able to batch add keys and values from a generated configuration file. Is there a better way to do this?

eiselesr avatar Dec 06 '17 15:12 eiselesr

Ftm moment I haven't implemented v3 since it flattened the namespace and you can't really import/export a nested structure anymore. You can simulate it thought using a (dot) notation like:

/sub1/
    sub2/
        my-key

To either:

.sub1.sub2.key: value /sub1/sub2/key: value

Not sure how use-full that would be thought.

As for adding single key with a config in it like JSON/YAML you can do that with etcdctl.

ake-persson avatar Dec 06 '17 15:12 ake-persson

Suggestions as how to handle this is welcome either use a flat name space for import/export in etcdv3 or simulate a nested one.

ake-persson avatar Dec 06 '17 16:12 ake-persson

https://github.com/soyking/e3ch

foxdalas avatar Dec 26 '17 15:12 foxdalas

I am still looking for a good tool to backup and restore etcd v3. Do you still have the plan or is there any good alternative tools to recommend?

cliang57 avatar Mar 10 '18 13:03 cliang57

I'm planning on supporting etcdv3, I started prototyping a backend that can support etcd v2/v3. https://github.com/mickep76/kvstore

Atm. for etcdv3 there are some options included in the tools themselves.

ake-persson avatar Mar 10 '18 13:03 ake-persson