kubectl_patch
Update Kubernetes resources by applying strategic, JSON merge, or JSON patch to modify fields without full replacement.
Instructions
Update field(s) of a resource using strategic merge patch, JSON merge patch, or JSON patch
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the resource to patch | |
| dryRun | No | If true, only validate the resource, don't actually execute the operation | |
| context | No | Kubeconfig Context to use for the command (optional - defaults to null) | |
| namespace | No | Kubernetes namespace | default |
| patchData | No | Patch data as a JSON object | |
| patchFile | No | Path to a file containing the patch data (alternative to patchData). The path is read on the machine running the MCP server, so it is rejected when the server runs over a remote (SSE/Streamable HTTP) transport; use 'patchData' to pass the patch contents instead. | |
| patchType | No | Type of patch to apply | strategic |
| resourceType | Yes | Type of resource to patch (e.g., pods, deployments, services) |