k8s-backup
Kubernetes backup and restore with Velero. Use when creating backups, restoring applications, managing disaster recovery, or migrating workloads between clusters.
Best use case
k8s-backup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Kubernetes backup and restore with Velero. Use when creating backups, restoring applications, managing disaster recovery, or migrating workloads between clusters.
Teams using k8s-backup should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/k8s-backup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How k8s-backup Compares
| Feature / Agent | k8s-backup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Kubernetes backup and restore with Velero. Use when creating backups, restoring applications, managing disaster recovery, or migrating workloads between clusters.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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
```python
velero_detect_tool()
velero_backup_locations_list_tool()
```
## Create Backups
```python
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
```python
velero_backups_list_tool()
velero_backup_get_tool(name="my-backup")
```
## Restore from Backup
```python
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
```python
velero_restores_list_tool()
velero_restore_get_tool(name="my-restore")
```
## Scheduled Backups
```python
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
```python
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
```python
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
```bash
velero install --provider aws --bucket my-bucket --secret-file ./credentials
```
## Related Skills
- [k8s-multicluster](../k8s-multicluster/SKILL.md) - Multi-cluster operations
- [k8s-incident](../k8s-incident/SKILL.md) - Incident responseRelated Skills
k8s-vind
Manage vCluster (virtual Kubernetes clusters) instances using vind. Use when creating, managing, or operating lightweight virtual clusters for development, testing, or multi-tenancy.
k8s-troubleshoot
Debug Kubernetes pods, nodes, and workloads. Use when pods are failing, containers crash, nodes are unhealthy, or users mention debugging, troubleshooting, or diagnosing Kubernetes issues.
k8s-storage
Kubernetes storage management for PVCs, storage classes, and persistent volumes. Use when provisioning storage, managing volumes, or troubleshooting storage issues.
k8s-service-mesh
Manage Istio service mesh for traffic management, security, and observability. Use for traffic shifting, canary releases, mTLS, and service mesh troubleshooting.
k8s-security
Audit Kubernetes RBAC, enforce policies, and manage secrets. Use for security reviews, permission audits, policy enforcement with Kyverno/Gatekeeper, and secret management.
k8s-rollouts
Progressive delivery with Argo Rollouts and Flagger. Use when implementing canary deployments, blue-green deployments, or traffic shifting strategies.
k8s-policy
Kubernetes policy management with Kyverno and Gatekeeper. Use when enforcing security policies, validating resources, or auditing policy compliance.
k8s-operations
kubectl operations for applying, patching, deleting, and executing commands on Kubernetes resources. Use when modifying resources, running commands in pods, or managing resource lifecycle.
k8s-networking
Kubernetes networking management for services, ingresses, endpoints, and network policies. Use when configuring connectivity, load balancing, or network isolation.
k8s-multicluster
Manage multiple Kubernetes clusters, switch contexts, and perform cross-cluster operations. Use when working with multiple clusters, comparing environments, or managing cluster lifecycle.
k8s-kubevirt
Virtual machine management with KubeVirt on Kubernetes. Use when creating, managing, or troubleshooting VMs running on Kubernetes clusters.
k8s-kind
Manage kind (Kubernetes IN Docker) local clusters. Use when creating, testing, or developing with local Kubernetes clusters in Docker containers.