apply_resource
Apply Kubernetes resource manifests from YAML to create or update resources, with dry-run validation and controlled field ownership conflicts.
Instructions
Create or update a Kubernetes resource from a YAML manifest. In 'apply' mode (default), performs a server-side apply with FieldManager=radar and reports field ownership conflicts instead of taking ownership by default. Set force=true only when you intend to take field ownership from other managers (Helm, Flux, GitOps controllers, kubectl). In 'create' mode, performs a strict create that fails if the resource already exists. Supports multi-document YAML separated by '---'. Use dry_run to validate without persisting changes and preview the server-side result. Multi-document failures return per-document status because earlier documents may already be applied. By default returns compact post-mutation state, submitted-vs-live spec differences, rollout/pod status for workloads, and current related issues; set verify=false only when you need a terse write result.
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": {
"yaml": "<yaml>"
},
"name": "apply_resource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'apply' (default, create-or-update) or 'create' (fail if exists) | |
| yaml | Yes | YAML manifest to apply (supports multi-document with --- separator) | |
| force | No | apply mode only: force server-side apply field ownership conflicts and take ownership from other managers. Default false; use only when you intend to override Helm/Flux/GitOps/kubectl ownership. | |
| verify | No | return compact post-mutation state, rollout/pod status, and related issues; on dry_run return a preview diff. Default true; set false for a terse write result. | |
| dry_run | No | validate and preview the server-side result without persisting changes | |
| namespace | No | override namespace for the resource |