shlogg · Early preview
Cheedge Lee @cheedge

Update Etcd.yaml For Successful Restore

Update etcd.yaml to restore etcd: update hostPath in manifest to match new data directory. Example: `- hostPath: path: /root/default.etcd type: DirectoryOrCreate name: etcd-data

Why Update etcd.yaml?

In previous posts, we see we need to update the etcd.yaml file to make the restore work. And the reason for this step is related to kubelet working mechanism. 
Pod Reconciliation by kubelet:
The etcd static pod is managed by the kubelet, which uses the etcd.yaml manifest. If the manifest doesn't match the new data directory, the pod will continue using the old path, leading to a mismatch and potentially starting with stale or incorrect data.
(For more workflow details, you can check my previous post.)
Based on above, when we restored etcd to a different directory, we mus...