Skip to main content

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

  1. Stop the kube-api server
  2. Stop the ETCd servers
  3. etcdctl snapshot restore snapshot.db --data-dir /var/lib/etcd-from-backup tip! Must be a new directory.
  4. Ensure ETCd node health
  5. Restart Kube-api server