kubectl_delete
Delete Kubernetes resources by type, name, labels, or manifest to remove unwanted objects from clusters.
Instructions
Delete Kubernetes resources by resource type, name, labels, or from a manifest file
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "kubectl_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resourceType | No | Type of resource to delete (e.g., pods, deployments, services, etc.) | |
| name | No | Name of the resource to delete | |
| namespace | No | Kubernetes namespace | default |
| labelSelector | No | Delete resources matching this label selector (e.g. 'app=nginx') | |
| manifest | No | YAML manifest defining resources to delete (optional) | |
| filename | No | Path to a YAML file to delete resources from (optional) | |
| allNamespaces | No | If true, delete resources across all namespaces | |
| force | No | If true, immediately remove resources from API and bypass graceful deletion | |
| gracePeriodSeconds | No | Period of time in seconds given to the resource to terminate gracefully | |
| context | No | Kubeconfig Context to use for the command (optional - defaults to null) |