0

I entered the etcd container:

kubectl -n kube-system exec -it etcd-k8scp -- sh

The I try to backup the container like explained in the K8s docs

ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb

I get this error:

Error: unknown command "save" for "etcdctl"

What's wrong with my command?

guettli
  • 3,113
  • 14
  • 59
  • 110

1 Answers1

2

I forgot to set $ENDPOINT.

If it is empty, then etcdctl gets this:

ETCDCTL_API=3 etcdctl --endpoints snapshot save snapshotdb

etcdctl thinks I want to address the endpoint called "snapshot" and execute the command "save"

:-)

guettli
  • 3,113
  • 14
  • 59
  • 110