Lab: CKA Mock Exam 4 (Q9: etcd backup restore)

Solve this question on: ssh cluster1-controlplane

An etcd backup is already stored at the path /opt/cluster1_backup_to_restore.db on the cluster1-controlplane node. Use /root/default.etcd as the --data-dir and restore it on the cluster1-controlplane node itself.

Before restoring the backup
cluster1-controlplane ~ ➜ k get all -A
NAMESPACE NAME READY STATUS RESTARTS AGE
default pod/auto-cka11-arch 1/1 Running 0 14s
default pod/check-time-cka03-trb 1/1 Running 0 68s
default pod/grape-pod-cka06-str 2/2 Running 0 10m
default pod/red-probe-cka12-trb 1/1 Running 0 41m
kube-system pod/calico-kube-controllers-5745477d4d-w78ml 1/1 Running 0 134m
kube-system pod/canal-ms9sp 2/2 Running 0 132m
kube-system pod/canal-pf7qb 2/2 Running 0 134m
kube-system pod/canal-r7drt 2/2 Running 0 133m
kube-system pod/coredns-7484cd47db-gnhwx 1/1 Running 0 134m
kube-system pod/coredns-7484cd47db-z2h5c 1/1 Running 0 134m
kube-system pod/etcd-cluster1-controlplane 1/1 Running 0 134m
kube-system pod/kube-apiserver-cluster1-controlplane 1/1 Running 0 134m
kube-system pod/kube-controller-manager-cluster1-controlplane 1/1 Running 0 134m
kube-system pod/kube-proxy-skwb7 1/1 Running 0 134m
kube-system pod/kube-proxy-tc74s 1/1 Running 0 133m
kube-system pod/kube-proxy-z6trv 1/1 Running 0 132m
kube-system pod/kube-scheduler-cluster1-controlplane 1/1 Running 0 134m
nginx-gateway pod/nginx-gateway-96f76cdcf-ft444 2/2 Running 0 45m

NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 172.20.0.1 443/TCP 134m
kube-system service/kube-dns ClusterIP 172.20.0.10 53/UDP,53/TCP,9153/TCP 134m
nginx-gateway service/nginx-gateway NodePort 172.20.3.20 80:30080/TCP,443:30081/TCP 45m

NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system daemonset.apps/canal 3 3 3 3 3 kubernetes.io/os=linux 134m
kube-system daemonset.apps/kube-proxy 3 3 3 3 3 kubernetes.io/os=linux 134m

NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
kube-system deployment.apps/calico-kube-controllers 1/1 1 1 134m
kube-system deployment.apps/coredns 2/2 2 2 134m
nginx-gateway deployment.apps/nginx-gateway 1/1 1 1 45m

NAMESPACE NAME DESIRED CURRENT READY AGE
kube-system replicaset.apps/calico-kube-controllers-5745477d4d 1 1 1 134m
kube-system replicaset.apps/coredns-7484cd47db 2 2 2 134m
nginx-gateway replicaset.apps/nginx-gateway-96f76cdcf 1 1 1 45m

And after restoring backup all solved question on are disappeared and I ended exam at this step to see marks as in last exam feel doubt on this question
I dont think this question should be on control-plane1

You’ve just shared the dump of STDOUT output of a command k get all -A.

To assist you better on this, it would have helped if you had shared the commands and the steps you took to solve this question.

Also, to help readability, please share any commands and output in

Code blocks