describe_pod
Retrieve detailed information about a specific pod in a Kubernetes cluster using pod name and namespace, enabling efficient cluster management.
Instructions
Describe a specific pod
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | default | |
| pod_name | Yes |
Implementation Reference
- kubernetes.py:45-53 (handler)The handler function for the 'describe_pod' tool. It is decorated with @mcp.tool() which also serves as the registration. Executes 'kubectl describe pod' to retrieve detailed information about the specified pod and returns it as a dictionary.@mcp.tool() async def describe_pod(pod_name: str, namespace: str = "default") -> dict: """Describe a specific pod""" try: cmd = ["kubectl", "describe", "pod", pod_name, "-n", namespace] result = subprocess.run(cmd, capture_output=True, text=True, check=True) return {"description": result.stdout} except subprocess.CalledProcessError as e: return {"error": f"Failed to describe pod: {str(e)}"}