etcdctl complete delete wipe

Created on 18 Sep 2018  路  2Comments  路  Source: etcd-io/etcd

For local testing, I find myself wanting to just completely "wipe" any data etcd from the CLI with etcdctl :

https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/ proposes this, but NOK:

$ etcdctl del "" --prefix
No help topic for 'del'

$ etcdctl rm -r ""
$ Error:  107: Root is read only (/) [3]

Currently I do it like this, but this of course feels more like a workaround:

$ sudo systemctl stop etcd
$ sudo rm -rf /var/lib/etcd/default.etcd
$ sudo systemctl start etcd

PS: Old and close #2385 had something similar, it seems.

Most helpful comment

@vorburger does ETCDCTL_API=3 etcdctl del "" --from-key=true do the trick?

All 2 comments

@vorburger does ETCDCTL_API=3 etcdctl del "" --from-key=true do the trick?

@hexfusion oh. Yeah - that seems to work great; thanks!

Was this page helpful?
0 / 5 - 0 ratings