Is there a way to only backup GKE secrets with GKE backup?

I want to be able to backup only the secrets on a GKE cluster and nothing else.

The pricing on GKE backup seems pretty steep if your backup includes pods. 

Since I only want to backup the secrets on my clusters, my bill shouldn't be very high.

So far I haven't been able to figure out a way to only backup the secrets.

One method I tried was to create a protected application that only matched the type secrets like this.

apiVersion: gkebackup.gke.io/v1alpha2
kind: ProtectedApplication
metadata:
  name: my-secret-backup-plan-test
  namespace: staging
spec:
  resourceSelection:
    type: Selector
    selector:
      matchLabels:
        type: secret

But when I try create a backup plan that only backs up the protected application that I created (which only includes secrets) then I can't unselect the option that says "Kubernetes Resources are included in all backups" see this screenshot:

Screenshot 2023-07-06 at 09.59.00.png

 From my understanding that would then also include pods. For my  use case I really only want to backup the secrets on the cluster and nothing else.

Has anyone been able to achieve this to only backup the secrets on a cluster and nothing else?

This seems like a very ordinary use case to me that many people could benefit from.

 
0 2 286
2 REPLIES 2

Hello @timogoosen,

Welcome to Google Cloud Community!

This link might help you in using the new Kubernetes resource, ProtectedApplication.

https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/how-to/protected-application

Thanks

Thanks just please read my question again. 

I read that doc and tried creating a protected application yet the backup still seems to include pods.

Top Labels in this Space