replicaset_delete
Delete a ReplicaSet from a specified namespace in Kubernetes clusters managed by k8s-pilot. This tool removes ReplicaSet resources to manage application scaling and deployments.
Instructions
Delete a ReplicaSet from the specified namespace.
Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ReplicaSet name
Returns: Status of the deletion operation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| namespace | Yes | ||
| name | Yes |
Implementation Reference
- tools/replicaset.py:110-127 (handler)The handler function for the 'replicaset_delete' MCP tool. It is registered via the @mcp.tool() decorator and uses the Kubernetes API to delete the specified ReplicaSet. Includes decorators for context and permissions.@mcp.tool() @use_current_context @check_readonly_permission def replicaset_delete(context_name: str, namespace: str, name: str): """ Delete a ReplicaSet from the specified namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ReplicaSet name Returns: Status of the deletion operation """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] apps_v1.delete_namespaced_replica_set(name=name, namespace=namespace) return {"name": name, "status": "Deleted"}