Рет қаралды 2,074
In this video, I have discussed key details about etcd such as
1. Working with ETCD
2. ETCD Pod details such as IP address, --data-dir
3. Snapshot Status check
4. How to restore ETCD Cluster Data
Part#1, the ETCD Backup Procedure is covered.
Documentation References:
kubernetes.io/...
discuss.kubern...
Play with Kubernetes:
katacoda.com/l...
SUBSCRIBE TO MY CHANNEL!!
Commands since the technical issues with the video:
Restore etcd snapshot to a new folder “/var/lib/etcd-snapshot”
ETCDCTL_API=3 etcdctl snapshot restore /tmp/snapshotdb-06-17-21 --endpoints 10.2.0.18:2379 --data-dir=/var/lib/etcd-snapshot
you can use --skip-hash-check, if needed.
Update the /etc/kubernetes/manifests/etcd.yaml
$vi /etc/kubernetes/manifests/etcd.yaml
update the hostpath for the volume called “etcd-data” i.e. replace /var/lib/etcd with /var/lib/etcd-snapshot.
Verify ETCD pod is recreated and running as desired.
$watch docker ps | grep etcd
$kubectl delete pod etcd-masternode -n kube-system --force #Only if needed
$kubectl get pods -A # to confirm the pod is ready 1/1 state
Note: Please replace the pod name with your pod's name in the commands above.