Skip to content

Instantly share code, notes, and snippets.

@canhnt
Created September 28, 2018 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save canhnt/a7a9f3aacecc6ac6356b90ab5e831aba to your computer and use it in GitHub Desktop.
Save canhnt/a7a9f3aacecc6ac6356b90ab5e831aba to your computer and use it in GitHub Desktop.
Compact and defrag etcd cluster
# Ref https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/maintenance.md#space-quota
export ETCDCTL_API=3
etcdctl endpoint status --write-out="json"
etcdctl endpoint status --write-out="table"
etcdctl compact $rev
etcdctl defrag
etcdctl endpoint status --write-out="table"
etcdctl alarm list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment