Hi Team, Getting below error message with etcd backup. Any clue please? root@con . . .

Sambasiva Rao:
Hi Team, Getting below error message with etcd backup. Any clue please?
root@controlplane:/etc/kubernetes/pki# ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 --cacert=ca.crt --cert=etcd/healthcheck-client.crt --key=etcd/healthcheck-client.key member list
Error: context deadline exceeded

CS:

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 

CS:
looks like context is not correct which you are using

Nitin Kumar Sharma:
one question here is --endpoints is necessary to add while taking bkp , , also if needed so always it will be local host with port 2379

Sambasiva Rao:
Still I am getting same error with second attempt in the new session.
root@controlplane:~# ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key snapshot save /opt/etcd-backup.db
Error: context deadline exceeded

I did’t changed any context. Any clue would be great help. Thanks

unnivkn:
Hi @Sambasiva Rao please try this:

unnivkn:
ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379
–cert=/etc/kubernetes/pki/etcd/server.crt
–key=/etc/kubernetes/pki/etcd/server.key
–cacert=/etc/kubernetes/pki/etcd/ca.crt
member list

Sambasiva Rao:
Thanks @unnivkn It’s working fine with healthcheck-client files itself…

Nitin Kumar Sharma:
@unnivkn one question here is --endpoints is necessary to add while taking bkp , , also if needed so always it will be local host with port 2379 ? or cacert, key,cert is enough for it

unnivkn:
Hi @Nitin Kumar Sharma --endpoints 127.0.0.1:2379 is your etcd server ip & port. This option is optional, while you are running from an etcd server. In our case master/controlplane & etcd server are the same. That’s why, if some one like to use the endpoint option, they can use local host IP & etcd port. ie, 127.0.0.1:2379 . Hope this helps

Nitin Kumar Sharma:
thank you for help