ingress_delete
Remove a Kubernetes Ingress resource from a specified namespace using context_name and Ingress name. Part of the k8s-pilot MCP server for managing multiple clusters.
Instructions
Delete an Ingress from the specified namespace.
Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Ingress 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/ingress.py:129-146 (handler)The main handler function for the 'ingress_delete' MCP tool. It deletes a Kubernetes Ingress resource using the NetworkingV1Api client. Registered as a tool via the @mcp.tool() decorator. Includes input parameters, docstring schema description, and execution logic.@mcp.tool() @use_current_context @check_readonly_permission def ingress_delete(context_name: str, namespace: str, name: str): """ Delete an Ingress from the specified namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Ingress name Returns: Status of the deletion operation """ networking_v1: NetworkingV1Api = get_api_clients(context_name)["networking"] networking_v1.delete_namespaced_ingress(name=name, namespace=namespace) return {"name": name, "status": "Deleted"}