ingress_list
List all Ingress resources within a specific Kubernetes namespace using the k8s-pilot server. Simplifies cluster management by providing basic Ingress information.
Instructions
List all Ingresses in a given namespace.
Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace
Returns: List of Ingress basic information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| namespace | Yes |
Implementation Reference
- tools/ingress.py:9-25 (handler)The main handler function for the 'ingress_list' tool. It lists all Ingress resources in the specified namespace within the given Kubernetes context using the NetworkingV1Api.@mcp.tool() @use_current_context def ingress_list(context_name: str, namespace: str): """ List all Ingresses in a given namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace Returns: List of Ingress basic information """ networking_v1: NetworkingV1Api = get_api_clients(context_name)["networking"] ingresses = networking_v1.list_namespaced_ingress(namespace) result = [{"name": ingress.metadata.name} for ingress in ingresses.items] return result