gke-backup-dr
What it does
This skill helps an AI agent configure Backup for GKE, including backup plans, restore plans and encrypted backups. It is for teams who need to protect cluster data and recover it.
When to use it
- ✓When you need a backup policy for a GKE cluster.
- ✓When you want to restore a GKE cluster or its workloads after a problem.
- ✓When you want backups encrypted with customer-managed keys.
Skill link
https://github.com/google/skills/blob/main/skills/cloud/gke-backup-dr/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you set up daily backups of my GKE cluster, including volume data, so I can restore it later?”
5 new skills a week. 1 minute to read.
How it works
The agent turns on the Backup for GKE add-on, then creates a backup plan with a schedule and a restore plan. Volume data and secrets are only included when the plan turns them on.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
GKE Backup & Disaster Recovery
Protects stateful GKE workloads using Backup for GKE. Backup for GKE can capture both Kubernetes resource metadata (manifests, configurations, and secrets) and the underlying persistent volume (PV) data — but volume data and secrets are only captured when the backup plan explicitly enables them (see the flags below).
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-backup-dr)"
and append agent-skills/1.0 (skill:gke-backup-dr) to User-Agent headers.
CLI Reference
# Enable the BackupRestore addon (Slow cluster-level update)
gcloud container clusters update {cluster_name} \
--update-addons=BackupRestore=ENABLED --location={location} --quiet
# Create Backup Plan
gcloud beta container backup-restore backup-plans create {plan_name} \
--project={project_id} --location={location} \
--cluster=projects/{project_id}/locations/{location}/clusters/{cluster_name} \
--all-namespaces \
--include-volume-data --include-secrets \
--backup-retain-days={days} --cron-schedule="{cron}" --quiet
# Trigger Manual Backup
gcloud beta container backup-restore backups create {backup_name} \
--backup-plan={plan_name} --location={location} --quiet
# Create Restore Plan
gcloud beta container backup-restore restore-plans create {restore_plan_name} \
--location={location} \
--cluster=projects/{project_id}/locations/{location}/clusters/{target_cluster_name} \
--backup-plan=projects/{project_id}/locations/{location}/backupPlans/{source_backup_plan_name} \
--all-namespaces \
--cluster-resource-conflict-policy=use-existing-version \
--namespaced-resource-restore-mode=fail-on-conflict --quiet
# Execute Restore
gcloud beta container backup-restore restores create {restore_name} \
--restore-plan={restore_plan_name} --location={location} \
--backup=projects/{project_id}/locations/{location}/backupPlans/{source_backup_plan_name}/backups/{backup_name} \
--quiet
# Verify Restore Status
gcloud beta container backup-restore restores describe {restore_name} \
--restore-plan={restore_plan_name} --location={location}
[!WARNING]
--include-volume-dataand--include-secretsBOTH DEFAULT TO FALSE. If you omit them, the backup plan silently produces config-only backups with no persistent volume snapshots and no Secrets. Always pass both flags explicitly when the goal is full workload protection.
Notes:
- The
backup-restorecommand group requires thegcloud betacomponent (gcloud components install beta). --clusterrequires the full resource pathprojects/{project_id}/locations/{location}/clusters/{cluster_name}(orprojects/{project_id}/zones/{zone}/clusters/{cluster_name}for zonal clusters), not a bare cluster name.- Restore plans require exactly one namespaced-resource scope flag:
--all-namespaces,--selected-namespaces={ns1},{ns2},--excluded-namespaces=...,--selected-applications=..., or--no-namespaces.
Restore Safety (CRITICAL)
A restore writes into a live cluster and, depending on the conflict policy, can overwrite or delete existing resources:
--cluster-resource-conflict-policy=use-existing-versionkeeps existing cluster-scoped resources (safe default);use-backup-versiondeletes the existing version first — deleting a CRD deletes all of its CRs.--namespaced-resource-restore-mode=fail-on-conflictaborts on any conflict (safe default);merge-skip-on-conflictskips conflicting resources;merge-replace-on-conflictandmerge-replace-volume-on-conflictoverwrite existing resources or volumes;delete-and-restoredeletes entire conflicting namespaces (and all resources in them) before restoring.
Rules:
- Validate the restore in a non-production target cluster first.
- Prefer the safe defaults (
use-existing-version+fail-on-conflict) unless the user explicitly needs to revert live resources. - Always obtain explicit user confirmation before executing a restore into a production cluster, and state which conflict policy is in effect and what it may overwrite or delete.
Best Practices
- **CMEK Encr
FAQ
Are volume data and secrets always backed up?
No. They are only captured when the backup plan explicitly turns them on.
Does it cover database backups?
No. The skill says not to use it for database backups.
How long are backups kept?
You set the number of days to keep backups in the backup plan.
Details
Original description by the author
Configures Backup for GKE: the BackupRestore cluster addon, BackupPlan and RestorePlan resources, restore workflows, and CMEK-encrypted backups. Use for backup policies, disaster recovery, or GKE cluster restores. Don't use for database backups.
repo: google/skills
Popularity
- GitHub stars
- 22k
- Ranking position
- #10278
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
finding-google-skills
22kHelps your agent find the right Google guides for a setup task, such as hosting, databases, storage, sign-in or AI model serving.
gcloud
22kHelps your agent write and check Google Cloud gcloud commands, looking up exact syntax before it runs anything so it does not guess flags.
google-cloud-recipe-auth
22kGuides your agent through Google Cloud identity and access, including how people and services sign in and which permissions they get.
google-cloud-recipe-onboarding
22kWalks a new developer through first steps on Google Cloud, including choosing a project, linking billing, and deploying a first resource.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.