1

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
  • 25,042
  • 81
  • 346
  • 663
  • Dear Stackoverflow-Police please tell Kubernetes.io to link to Serverfault and not Stackoverflow, if you want to redirect the traffic to that site. Then I will create answers there. – guettli Jan 30 '22 at 09:37

1 Answers1

3

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
  • 25,042
  • 81
  • 346
  • 663