Etcd backup in CKA exams are not straightforward…is there any one who can help m . . .

Nithin Nk:
etcd backup in CKA exams are not straightforward…is there any one who can help me in restoring etcd from worker node

kandulaz IOT:
How are these being backedup ? i haven’t reached there though

Basavraj Nilkanthe:
@Nithin Nk If you understand concept clearly, I dont think you will find any difficulty while taking etcd backup and restore… some more practice with different questions will get more idea on this… Most of the fails while restoring data and this is bit challenging as you might need to take care of changes in important place like volume: hostPath: location , you might need to provide proper data-dir= path which is different than current path otherwise it conflict

Ahsan:
Basav if you understand the concept it is still complicated but there is a good step by step instruction on lecture 251 by CCRM in QA section

Basavraj Nilkanthe:
ok

Basavraj Nilkanthe:
In CKA practice test course you are talking?

Basavraj Nilkanthe:
if something else, could you please share link

Erez Weinstein:
follow this: https://github.com/mmumshad/kubernetes-the-hard-way/blob/master/practice-questions-answers/cluster-maintenance/backup-etcd/etcd-backup-and-restore.md|https://github.com/mmumshad/kubernetes-the-hard-way/blob/master/practice-questions[…]wers/cluster-maintenance/backup-etcd/etcd-backup-and-restore.md

Mohamed Ayman:
This thread will be useful:
https://community.kodekloud.com/t/exam-failed-blocking-questions-etcd-restore-and-cluster-upgrade/16939/13

Basavraj Nilkanthe:
Thank you both

Hi Nithin,
ETCD backup \ restore question is pretty easy if you forget about k8s.
you have etcd RUNNING on NODE - it’s NOT A PART of k8s cluster.
So, take a backup using certs provided in the question.

  • Execute “member list” and “snapshot status” to check hash
  • stop service - systemctl stop etcd
  • restore another backup using same certs, endpoint, and DIFFERENT dir
  • chown -R etcd:etcd /DIR_YOU_RESTORE
  • change dir in the service file
  • system daemon-reload
  • systermctl start etcd
  • systemctl status etcd
  • member list - to check you have different hash
    AGAIN - just think about ETCD as a dedicated service, NOT a part of k8s
    Hope this helps.