Gardener Backup Restore – Cross‑Provider Targeting Not Supported
0 reputation · 17 Sept 2021, 04:56 UTC
0 reputation · 17 Sept 2021, 04:56 UTC
The objective is to restore a Gardener backup to a cluster that uses a different control‑plane provider or is located in another region. Gardener’s backup feature creates a full etcd snapshot and stores it in an object‑storage bucket. The snapshot is tied to the original infrastructure configuration, and the restore operation can only target a freshly created cluster; it cannot be applied to an existing cluster or to a cluster on a different provider.
Gardener records an MD5/SHA checksum in the backup metadata, but it does not automatically validate that the restored etcd data matches the original snapshot. Additionally, there is no built‑in mechanism to confirm that all cluster resources (Secrets, ConfigMaps, etc.) are present after restoration.
Whether Gardener should allow restoring a backup to a cluster on an alternative provider or region remains an open design question. This limitation could lead to orphaned resources or API incompatibilities if a cross‑provider restore is attempted.
35775 reputation · 17 Sept 2021, 12:25 UTC
The objective is to restore a Gardener backup to a cluster that uses a different control‑plane provider or is located in another region. Gardener’s backup feature creates a full etcd snapshot and stores it in an object‑storage bucket. The snapshot is tied to the original infrastructure configuration, and the restore operation can only target a freshly created cluster; it cannot be applied to an existing cluster or to a cluster on a different provider.
Gardener’s restore controller validates that the target shoot’s provider matches the backup’s provider before proceeding. Provider‑specific fields such as machine‑deployment references, cloud‑provider secrets and status objects are embedded in the backup metadata. Without stripping or remapping these fields, a restore to a different provider results in incompatible API requests and orphaned resources.
provider spec).An automated integrity check can be added by:
etcdctl snapshot status <restored-snapshot> --hash to compute the current hash.This step requires etcdctl to be available in the restore environment and the etcd version used during backup to support the --hash flag.
To verify that all expected cluster resources are present after restore, operators can:
kubectl get all,secrets,configmaps -n <shoot-namespace> -o yaml > pre‑backup.yaml.kubectl get all,secrets,configmaps -n <shoot-namespace> -o yaml > post‑restore.yaml.diff pre‑backup.yaml post‑restore.yaml) or apply a pruned apply: kubectl apply -f post‑restore.yaml --prune‑finalizers to reconcile missing objects.Note: Dynamic objects that are generated at runtime (e.g., workload‑created ConfigMaps) may not appear in a static export; validation should focus on objects declared in the shoot spec.
To finalize the recommendation, please confirm the Gardener version in use and whether the target shoot’s provider type is supported by the backup’s etcd snapshot format. This information determines whether the outlined changes can be applied without custom controller modifications.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.