k8s-backup
Manage Kubernetes disaster recovery and workload migration using Velero.
Install
mkdir -p .claude/skills/k8s-backup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3117" && unzip -o skill.zip -d .claude/skills/k8s-backup && rm skill.zipInstalls to .claude/skills/k8s-backup
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Kubernetes backup and restore with Velero. Use when creating backups, restoring applications, managing disaster recovery, or migrating workloads between clusters.Key capabilities
- →Detect Velero installation
- →Create namespace backups
- →Restore applications from backups
- →Manage scheduled backups
- →Orchestrate disaster recovery
How it works
It interfaces with Velero tools to trigger snapshots, list backups, and execute restore operations across Kubernetes namespaces.
Inputs & outputs
When to use k8s-backup
- →Creating recurring backups for production namespaces
- →Restoring applications to a new cluster
- →Disaster recovery planning
- →Migrating workloads between Kubernetes environments
About this skill
Kubernetes Backup with Velero
Manage backups and restores using kubectl-mcp-server's Velero tools.
When to Apply
Use this skill when:
- User mentions: "backup", "restore", "Velero", "disaster recovery", "DR"
- Operations: creating backups, restoring namespaces, migration
- Keywords: "protect", "recover", "migrate", "snapshot"
Priority Rules
| Priority | Rule | Impact | Tools |
|---|---|---|---|
| 1 | Verify Velero installation first | CRITICAL | velero_detect_tool |
| 2 | Check backup location before create | HIGH | velero_backup_locations_list_tool |
| 3 | Wait for backup completion | HIGH | velero_backup_get_tool |
| 4 | Test restores to non-prod first | MEDIUM | velero_restore_create_tool |
Quick Reference
| Task | Tool | Example |
|---|---|---|
| Detect Velero | velero_detect_tool | velero_detect_tool() |
| List backups | velero_backups_list_tool | velero_backups_list_tool() |
| Create backup | velero_backup_create_tool | velero_backup_create_tool(name, namespaces) |
| Restore | velero_restore_create_tool | velero_restore_create_tool(name, backup_name) |
Check Velero Installation
velero_detect_tool()
velero_backup_locations_list_tool()
Create Backups
velero_backup_create_tool(
name="my-backup",
namespaces=["default", "app-namespace"]
)
velero_backup_create_tool(
name="app-backup",
namespaces=["default"],
label_selector="app=my-app"
)
velero_backup_create_tool(
name="config-backup",
namespaces=["default"],
exclude_resources=["pods", "replicasets"]
)
velero_backup_create_tool(
name="daily-backup",
namespaces=["production"],
ttl="720h"
)
List and Describe Backups
velero_backups_list_tool()
velero_backup_get_tool(name="my-backup")
Restore from Backup
velero_restore_create_tool(
name="my-restore",
backup_name="my-backup"
)
velero_restore_create_tool(
name="my-restore",
backup_name="my-backup",
namespace_mappings={"old-ns": "new-ns"}
)
velero_restore_create_tool(
name="config-restore",
backup_name="my-backup",
include_resources=["configmaps", "secrets"]
)
velero_restore_create_tool(
name="partial-restore",
backup_name="my-backup",
exclude_resources=["persistentvolumeclaims"]
)
List and Monitor Restores
velero_restores_list_tool()
velero_restore_get_tool(name="my-restore")
Scheduled Backups
velero_schedules_list_tool()
velero_schedule_get_tool(name="daily-backup")
kubectl_apply(manifest="""
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: daily-backup
namespace: velero
spec:
schedule: "0 2 * * *"
template:
includedNamespaces:
- production
ttl: 720h
""")
Disaster Recovery Workflow
Create DR Backup
from datetime import datetime
velero_backup_create_tool(
name=f"dr-backup-{datetime.now().strftime('%Y%m%d-%H%M%S')}",
namespaces=["production"]
)
velero_backup_get_tool(name="dr-backup-20260130-120000")
Restore to New Cluster
velero_detect_tool()
velero_backups_list_tool()
velero_restore_create_tool(
name="dr-restore",
backup_name="dr-backup-..."
)
velero_restore_get_tool(name="dr-restore")
Prerequisites
- Velero: Required for all backup tools
velero install --provider aws --bucket my-bucket --secret-file ./credentials
Related Skills
- k8s-multicluster - Multi-cluster operations
- k8s-incident - Incident response
When not to use it
- →When the cluster does not have Velero installed
- →When the user does not have permissions to manage cluster resources
Prerequisites
Limitations
- →Requires Velero to be installed and configured
- →Limited by the underlying storage provider capabilities
How it compares
It provides a structured workflow for disaster recovery and migration specifically tailored for Velero-managed Kubernetes environments.
Compared to similar skills
k8s-backup side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| k8s-backup (this skill) | 1 | 6mo | Review | Intermediate |
| container-security-testing | 1 | 7mo | Review | Intermediate |
| devops-iac-engineer | 2 | 7mo | Review | Advanced |
| deployment-engineer | 4 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by rohitg00
View all by rohitg00 →You might also like
container-security-testing
Ed1s0nZ
容器安全测试的专业技能和方法论
devops-iac-engineer
davila7
Implements infrastructure as code using Terraform, Kubernetes, and cloud platforms. Designs scalable architectures, CI/CD pipelines, and observability solutions. Provides security-first DevOps practices and site reliability engineering guidance.
deployment-engineer
sickn33
Expert deployment engineer specializing in modern CI/CD pipelines, GitOps workflows, and advanced deployment automation. Masters GitHub Actions, ArgoCD/Flux, progressive delivery, container security, and platform engineering. Handles zero-downtime deployments, security scanning, and developer experience optimization. Use PROACTIVELY for CI/CD design, GitOps implementation, or deployment automation.
devops
mrgoonie
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
k8s-kind
rohitg00
Manage kind (Kubernetes IN Docker) local clusters. Use when creating, testing, or developing with local Kubernetes clusters in Docker containers.
devops-engineer
Jeffallan
Use when setting up CI/CD pipelines, containerizing applications, or managing infrastructure as code. Invoke for pipelines, Docker, Kubernetes, cloud platforms, GitOps.