In a Kubernetes cluster I have several apps deployed in the same namespace called "default". An app consist of a webserver pod and a database pod.

How to restore one single app in the original cluster from a backup plan from Backup for GKE?

In the cluster I have defined several ProtectedApplication's for the backup agent for it to identify the distinct applications (websites). This definitions looks like:

kind: ProtectedApplication
apiVersion: gkebackup.gke.io/v1alpha2
  name: test
  namespace: default
    type: Selector
        app.kubernetes.io/instance: test
    - name: wordpress
      resourceKind: Deployment
      resourceNames: ["test-wordpress"]
        type: BackupAllRestoreAll
        backupAllRestoreAll: {}
    - name: mariadb
      resourceKind: StatefulSet
      resourceNames: ["test-mariadb"]
        type: BackupAllRestoreAll
        backupAllRestoreAll: {}

My main concern is about the option "Define conflict handling" in the restore plan configuration:

Define conflict handling creating a restore plan

It says:

Any conflicting namespaces in the target cluster (along with all their contained resources) will be deleted before a non-destructive restore is performed.

Does it really removes the entire "default" Kubernetes namespace before restoring only the protected application? I hope it only removes the resources inside the Kubernetes namespace that has the same names as found inside the backup that is to be restored. Can someone help me out here?

1 Answer 1


Good news! The restore procedure does not remove the whole namespace. But only the artifacts belonging to the ProtectedApplication are first removed, then restored from backup. Perfect!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.