Question about the ETCD practice test I have performed the following command {t . . .

Jason:
Question about the ETCD practice test

I have performed the following command {the top one does not work, the bottom one does but it is the answer key) I do not know what the difference is in the two. If I run the top on, it fails due to a path error stating that the path or file does not exist. The second command works though. Any thoughts here? The only thing I see idfferent is the brackets around the endpoint IP address but this was not shown in the video.

ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 \
–cacert=/etc/kubernetes/pki/etcd/ca.crt
–cert=/etc/kubernetes/pki/etcd/server.crt
–key=/etc/kubernetes/pki/etcd/server.key
snapshot save /opt/snapshot-pre-boot.db

ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379
–cacert=/etc/kubernetes/pki/etcd/ca.crt
–cert=/etc/kubernetes/pki/etcd/server.crt
–key=/etc/kubernetes/pki/etcd/server.key
snapshot save /opt/snapshot-pre-boot.db

Mohamed Ayman:
Check this for etcd backup and restore:
https://github.com/mmumshad/kubernetes-cka-practice-test-solution-etcd-backup-and-restore|https://github.com/mmumshad/kubernetes-cka-practice-test-solution-etcd-backup-and-restore

Bryan Tanoue:
I want to say I never used brackets with mine and it worked…I’d have to double check

unnivkn:
ETCDCTL_API=3 etcdctl --endpoints=<s://127.0.0.1:2379|127.0.0.1:2379>
–cacert=/etc/kubernetes/pki/etcd/ca.crt
–cert=/etc/kubernetes/pki/etcd/server.crt
–key=/etc/kubernetes/pki/etcd/server.key
snapshot save /opt/snapshot-pre-boot.db try this it will work for you. Just remove https:// & []

Karim Meslem:
I guess it’s the brackets. Shouldn’t be there. You’re asking for the obvious, IMO the answer lays embedded in your question :slightly_smiling_face:
use https:// for the endpoint whenever the endpoint is secured by ssl, else use http:// and leave out the certificate options --cacert etcetera