Backup & Restore
Backup
Backup points to consider
- Declarative files in source control - to re-apply Kubernetes states
kubectl get all --all-namespaces -o yaml > k8s-backup.yaml- ETCd snapshots or ETCd Cluster "data" directory
- Tools like Velero by HeptIO (formerly ARK)
Restore
- Stop the kube-api server
- Stop the ETCd servers
etcdctl snapshot restore snapshot.db --data-dir /var/lib/etcd-from-backuptip! Must be a new directory.- Ensure ETCd node health
- Restart Kube-api server