I am preparing for the CKA exam: backup etc database.
I tried to find a an easy solution, and came to this one:
Get shell access to the node running etcd. Then ps aux| grep etcd
Then you see the PID and the files which the etcd server uses.
Then you just need to change the command-line arguments
of etcd a bit to get the matching etcdctl command.
ETCDCTL_API=3 etcdctl --endpoints https://192.168.178.47:2379 \
--cert=/proc/1493/root/etc/kubernetes/pki/etcd/server.crt \
--key=/proc/1493/root/etc/kubernetes/pki/etcd/server.key \
--cacert=/proc/1493/root/etc/kubernetes/pki/etcd/ca.crt \
snapshot save snapshotdb
Is this a valid approach, or has it flaws?
ga2022
February 3, 2022, 2:47am
2
Hey Thomas, I used the link below during my preparation. It’s also accessible during the exam. Practice it multiple times and you should be good to go.
i tried to backup etcd to local cluster, but it seems only endpoint didn’t work properly, only this command work for me
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
are those certs mandatory to backup the etcd db?
while restoring, why these additional parameters need to be passed in, such as:
ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt \
--name=master \
--cer…
1 Like
Just to be clear - using this forum during the CKA/CKAD exam is grounds to have the exam terminated and revoked. It is not allowed to be used during the exam.
1 Like
I thought everything on kubernetes.io is allowed.
ONLY the kubernetes.io website, subdomains are not allowed.
ga2022
February 3, 2022, 5:58pm
6
Everything under kubernetes.io is allowed.
NO it is not - see here where its explicitly listed as NOT allowed
" No other tabs may be opened and no other sites may be navigated to (including https://discuss.kubernetes.io )."
See the docs here:
2 Likes
Thank you very much! I was not aware if the fact that the discussion forum is not allowed.
ga2022
February 3, 2022, 9:10pm
9
Thanks for posting. Thomas, you should be able to use that link to practice for your exam.