pv_delete
Remove PersistentVolumes in Kubernetes clusters managed by the k8s-pilot MCP server. Provide context name and PV name to execute deletion and retrieve operation status.
Instructions
Delete a PersistentVolume from the cluster.
Args: context_name: The Kubernetes context name name: The PersistentVolume name
Returns: Status of the deletion operation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| name | Yes |
Implementation Reference
- tools/pv.py:104-120 (handler)The pv_delete tool handler function, registered via @mcp.tool() decorator. Deletes the specified PersistentVolume using Kubernetes CoreV1Api. Includes input schema in function signature and docstring.@mcp.tool() @use_current_context @check_readonly_permission def pv_delete(context_name: str, name: str): """ Delete a PersistentVolume from the cluster. Args: context_name: The Kubernetes context name name: The PersistentVolume name Returns: Status of the deletion operation """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] core_v1.delete_persistent_volume(name=name) return {"name": name, "status": "Deleted"}