restore_from_backup
Write Kubernetes resources from a backup file: create missing objects, replace existing ones, and omit runtime metadata such as status, UID, and resourceVersion.
Instructions
按备份文件写回资源。不存在则创建,已存在则替换。不提交 status,以及 uid、resourceVersion、generation、creationTimestamp、managedFields、selfLink、deletionTimestamp、deletionGracePeriodSeconds。
Args: backup_file: 备份文件路径,必须位于备份目录内 target_namespace: 目标命名空间。指定时必须与资源 metadata.namespace 一致 target_cluster: 目标集群(可选) kubeconfig_path: kubeconfig 文件路径,不指定则使用 target_cluster 或默认集群
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"backup_file": "<backup_file>"
},
"name": "restore_from_backup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backup_file | Yes | ||
| target_cluster | No | ||
| kubeconfig_path | No | ||
| target_namespace | No |