From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Lesson 4 lab solution: etcd backup and restore

Lesson 4 lab solution: etcd backup and restore - Kubernetes Tutorial

From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Lesson 4 lab solution: etcd backup and restore

- Okay, etcd backup. Let me use kubectl get all. Do we have something interesting? Well, we have testdeploy. Testdeploy, that is good enough. I want something to verify my backup. And in the video in this lesson, you have learned how we can do the opposite. So how we can make sure that deployment that was created after making the backup is removed while restoring the backup. Now we are going to delete the testdeploy after creating the backup and get it back with restore. But first we need to sudo apt install etcd-client. And then we need the nasty long command. So that is sudo etcdctl - -endpoints=localhost: 2379 - -cacert /etc/kubernetes/pki/etcd. Do yourself a favor if you need to do this on the exam and copy it because you need it two more times. So first, ca.crt --cert, same path, /server.crt and --key, same path. Oops. We are missing a slash in front of the path. That's the danger of copy/paste. You switch off your brain and you make errors like this. So in the etcd we are going…

Contents