In my exam they have asked to restore on base node, not given any context. client certificate & client key has been given. how do we do restoration on client side
In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup ( the controlplane node) As a result, the only required option for the restore command is the --data-dir
Sanpshot save is easy but for restore there is different.db file and no data dir path given also when we restore to change path in etcd.yaml we need to switch to master node n make changes m i correct or need to restore in master node...can u please assist here
If it is not asked to change the context or ssh to master node, restore should be done on the host machine where etcd must be running as service, no need to touch actual master node.
@@captainveena8982 thanks for clearing this out so do we need to add data dir path by finding in systemctl status etcd to find static pod path and do entry?
After restore on student node, do we need to edit etcd.yaml on master node? since there is no static path /etc/kubernetes/manifests file on student node. Or just restore and don't touch etcd.yaml file?
@@iamnivas that i also wanted to know there is no static pod of etcd and etcd is running as a service so where we need to edit path of data dir to make it reflect or not? Captain veena can you please clear us on this
@Manoj Goli Step 1: check the etcd server status: cloud@edge-node:~$ systemctl status etcd ● etcd.service - etcd Loaded: loaded (/etc/systemd/system/etcd.service; enabled; vendor preset: Step 1: check the etcd server status: cloud@edge-node:~$ systemctl status etcd ● etcd.service - etcd Loaded: loaded (/etc/systemd/system/etcd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2021-01-29 21:58:40 CST; 2 days ago Docs: github.com/coreos 1 Main PID: 1299767 (etcd) Tasks: 10 (limit: 4615) Memory: 8.3M CGroup: /system.slice/etcd.service └─1299767 /usr/bin/etcd --name master-1 --cert-file=/etc/etcd/etcd.crt --key-file=/etc/etcd/etcd.key --peer-cert-file=/etc/etcd/etcd.cr> STep 2: cat /etc/systemd/system/etcd.service [Unit] Description=etcd Documentation=github.com/coreos [Service] ExecStart=/usr/bin/etcd -name master-1 -cert-file=/etc/etcd/etcd.crt -key-file=/etc/etcd/etcd.key -peer-cert-file=/etc/etcd/etcd.crt -peer-key-file=/etc/etcd/etcd.key -trusted-ca-file=/etc/etcd/ca.crt -peer-trusted-ca-file=/etc/etcd/ca.crt -peer-client-cert-auth -client-cert-auth -initial-advertise-peer-urls 11.0.0.79:2380 -listen-peer-urls 11.0.0.79:2380 -listen-client-urls 11.0.0.79:2379,127.0.0.1:2379 -advertise-client-urls 11.0.0.79:2379 -initial-cluster-token etcd-cluster-0 -initial-cluster master-1=11.0.0.79:2380 -initial-cluster-state new -data-dir=/var/lib/etcd Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target Step 3: You will see data dir paths on edge node. You can delete the etcd folder in data-dir before restoring is attempted. That way you no need to edit the yaml file. Hope it clears Just found one of the community forum ...
In the CKA exam, I see that the keys and certificate files are placed in the edge node and not on the master node. Is there a way to do etcd snapshot save and restore from edge node ? I was not able to copy the required key and certificate files to the master node.
@@kamilrana In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup ( the controlplane node) As a result, the only required option for the restore command is the --data-dir
In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup ( the controlplane node) As a result, the only required option for the restore command is the --data-dir and also in exam ETCD is deployed as a service so we need to change the --dat-dir in /etc/systemd/system/etcd.service file
you will go inside master node to run this command for will run from remote ?
Very nice demo👍👍
awsome video can you guide me about exam question
thank you @captain veena , very well explained
Can you make etc restore and some more questions
In my exam they have asked to restore on base node, not given any context. client certificate & client key has been given. how do we do restoration on client side
In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup (
the controlplane node) As a result, the only required option for the restore command is the --data-dir
Hi Mam I need your help on helm can you help
What exactly etcd and what it does
Sanpshot save is easy but for restore there is different.db file and no data dir path given also when we restore to change path in etcd.yaml we need to switch to master node n make changes m i correct or need to restore in master node...can u please assist here
If it is not asked to change the context or ssh to master node,
restore should be done on the host machine where etcd must be running as service, no need to touch actual master node.
@@captainveena8982 thanks for clearing this out so do we need to add data dir path by finding in systemctl status etcd to find static pod path and do entry?
After restore on student node, do we need to edit etcd.yaml on master node? since there is no static path /etc/kubernetes/manifests file on student node. Or just restore and don't touch etcd.yaml file?
@@iamnivas that i also wanted to know there is no static pod of etcd and etcd is running as a service so where we need to edit path of data dir to make it reflect or not? Captain veena can you please clear us on this
@Manoj Goli Step 1: check the etcd server status:
cloud@edge-node:~$ systemctl status etcd
● etcd.service - etcd
Loaded: loaded (/etc/systemd/system/etcd.service; enabled; vendor preset: Step 1: check the etcd server status:
cloud@edge-node:~$ systemctl status etcd
● etcd.service - etcd
Loaded: loaded (/etc/systemd/system/etcd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-01-29 21:58:40 CST; 2 days ago
Docs: github.com/coreos 1
Main PID: 1299767 (etcd)
Tasks: 10 (limit: 4615)
Memory: 8.3M
CGroup: /system.slice/etcd.service
└─1299767 /usr/bin/etcd --name master-1 --cert-file=/etc/etcd/etcd.crt --key-file=/etc/etcd/etcd.key --peer-cert-file=/etc/etcd/etcd.cr>
STep 2: cat /etc/systemd/system/etcd.service
[Unit]
Description=etcd
Documentation=github.com/coreos
[Service]
ExecStart=/usr/bin/etcd
-name master-1
-cert-file=/etc/etcd/etcd.crt
-key-file=/etc/etcd/etcd.key
-peer-cert-file=/etc/etcd/etcd.crt
-peer-key-file=/etc/etcd/etcd.key
-trusted-ca-file=/etc/etcd/ca.crt
-peer-trusted-ca-file=/etc/etcd/ca.crt
-peer-client-cert-auth
-client-cert-auth
-initial-advertise-peer-urls 11.0.0.79:2380
-listen-peer-urls 11.0.0.79:2380
-listen-client-urls 11.0.0.79:2379,127.0.0.1:2379
-advertise-client-urls 11.0.0.79:2379
-initial-cluster-token etcd-cluster-0
-initial-cluster master-1=11.0.0.79:2380
-initial-cluster-state new
-data-dir=/var/lib/etcd
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Step 3: You will see data dir paths on edge node.
You can delete the etcd folder in data-dir before restoring is attempted. That way you no need to edit the yaml file.
Hope it clears
Just found one of the community forum ...
In the CKA exam, I see that the keys and certificate files are placed in the edge node and not on the master node. Is there a way to do etcd snapshot save and restore from edge node ? I was not able to copy the required key and certificate files to the master node.
faced same problem, i couldn't find cert, key and cacert on masternode. was not able to complete this question
@Manoj Goli noo not yet. I skipped this one question in exam
@@kamilrana if u r not confident on this better to skip the question . If we try and make the config change of cert path it may crash the cluster.
@@kamilrana In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup (
the controlplane node) As a result, the only required option for the restore command is the --data-dir
In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup (
the controlplane node) As a result, the only required option for the restore command is the --data-dir
and also in exam ETCD is deployed as a service so we need to change the --dat-dir in /etc/systemd/system/etcd.service file
How to create a daemonset with kubectl command
ruclips.net/video/q7cE2OvM1zM/видео.html
cordon/uncordon/drain/unshedulable a worker node
ruclips.net/video/AMsbcl9J2YA/видео.html