Skip to main content
Glama

pv_delete

Remove a PersistentVolume from a Kubernetes cluster to free storage resources and manage cluster capacity.

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
NameRequiredDescriptionDefault
context_nameYes
nameYes

Implementation Reference

  • tools/pv.py:104-104 (registration)
    Registers the pv_delete tool using the MCP decorator.
    @mcp.tool()
  • The handler function for pv_delete tool, decorated with context and permission checks, implements deletion of PersistentVolume via Kubernetes CoreV1Api.
    @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"}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bourbonkk/k8s-pilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server