How to install etcd in kubernetes

Hi kodekloud team:

Since I’m finishing to study for the CKA certification, I’m doing the CKA mock exams. In the fourth exam Sign In | KodeKloud the question 13 which need to install etcd command use this approach to install etcdctl:

cluster1-controlplane ~ ➜ cd /tmp
cluster1-controlplane ~ ➜ export RELEASE=$(curl -s 
https://api.github.com/repos/etcd-io/etcd/releases/latest | grep tag_name | cut -d '"' -f 4)
cluster1-controlplane ~ ➜ wget https://github.com/etcd-io/etcd/releases/download/${RELEASE}/etcd-${RELEASE}-linux-amd64.tar.gz
cluster1-controlplane ~ ➜ tar xvf etcd-${RELEASE}-linux-amd64.tar.gz ; cd etcd-${RELEASE}-linux-amd64
cluster1-controlplane ~ ➜ mv etcd etcdctl  /usr/local/bin/
cluster1-controlplane ~ ➜ etcdctl snapshot restore --data-dir /root/default.etcd /opt/cluster1_backup_to_restore.db

But the current way to do it is like this: Install | etcd

also you can do this Releases · etcd-io/etcd · GitHub

and there is another approach to do it in this link GitHub - etcd-io/etcd: Distributed reliable key-value store for the most critical data of a distributed system

Any of the new approaches doesn’t work in the lab, and I’m not sure if the suggested one works, I’ll try latter because now I’m taking a little rest of studying to improve my learning. But I want to know if in the CKA exam they could make me do the installation of etcdctl, and which approach do you think is better.

have a nice day

You won’t be asked to install etcdctl in the exam. It will be present on any question for backup/restore.