deployment_delete
Remove a Kubernetes Deployment by specifying the context, namespace, and name. This tool ensures the deletion operation is executed and returns its status for verification.
Instructions
Delete a Deployment from the specified namespace.
Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Deployment name
Returns: Status of the deletion operation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| name | Yes | ||
| namespace | Yes |
Implementation Reference
- tools/deployment.py:110-127 (handler)The main handler function for the 'deployment_delete' MCP tool. It uses Kubernetes AppsV1Api to delete a deployment in the specified namespace and context. Registered via @mcp.tool() decorator.@mcp.tool() @use_current_context @check_readonly_permission def deployment_delete(context_name: str, namespace: str, name: str): """ Delete a Deployment from the specified namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Deployment name Returns: Status of the deletion operation """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] apps_v1.delete_namespaced_deployment(name=name, namespace=namespace) return {"name": name, "status": "Deleted"}