Backup of etcd Database Flashcards

1
Q

How to find the location of the etcd daemon data directory?

A

This can be identified by the –data-dir value in /etc/kubernetes/manifests/etcd.yaml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to log into the etcd container?

A

kubectl -n kube-system exec -it etcd-[name] – sh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Once logged into the etcd container, how to list the options available for the etcdctl command?

A

etcdctl -h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the command for interacting with the etcd database?

A

etcdctl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Newer versions of etcd image have been minimized, as a result ‘find’ command and ‘ls’ command may be missing. What command can be used as an alternative to view the files in the current directory?

A

echo *

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Is TLS needed to use etcdctl command?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the three files needed to be passed with the etcdctl command in order to use it?

A
  1. Certificate Authority: /etc/kubernetes/pki/etcd/ca.crt
  2. Server Certificate: /etc/kubernetes/pki/etcd/server.crt
  3. Server Key: /etc/kubernetes/pki/etcd/server.key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to pass the certificates to etcdctl command via environment variables from kubectl?

A

ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt ETCDCTL_CERT=/etc/kubernetes/pki/etcd/server.crt ETCDCTL_KEY=/etc/kubernetes/pki/etcd/server.key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Show the full command to etcdctl to retrieve the member list via passing certs through environment variables

A

kubectl -n kube-system exec -it etcd-master – sh -c “ETCDCTL_API=3 ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt ETCDCTL_CERT=/etc/kubernetes/pki/etcd/server.crt ETCDCTL_KEY=/etc/kubernetes/pki/etcd/server.key etcdctl –endpoints=https://127.0.0.1:2379 member list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In addition to backup of snapshot of etcd database, what else should be backed up in case the node becomes unavailable?

A

/root/kubeadm-config.yaml

/etc/kubernetes/pki/etcd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly