daemonset_list
List all DaemonSets in a specified Kubernetes namespace to monitor and manage cluster-wide deployments using the k8s-pilot server.
Instructions
List all DaemonSets in a given namespace.
Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace
Returns: List of DaemonSet basic information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| namespace | Yes |
Implementation Reference
- tools/daemonset.py:8-24 (handler)The main handler function for the 'daemonset_list' tool. It lists all DaemonSets in the specified namespace using the Kubernetes AppsV1Api. Decorated with @mcp.tool() for registration and @use_current_context for context management.@mcp.tool() @use_current_context def daemonset_list(context_name: str, namespace: str): """ List all DaemonSets in a given namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace Returns: List of DaemonSet basic information """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] daemonsets = apps_v1.list_namespaced_daemon_set(namespace) result = [{"name": ds.metadata.name} for ds in daemonsets.items] return result
- tools/daemonset.py:8-8 (registration)The @mcp.tool() decorator registers the daemonset_list function as an MCP tool.@mcp.tool()