kubectl_logs
Fetch log lines from a Kubernetes pod container by cluster, namespace, and pod to debug application issues without SSH access.
Instructions
Fetch log lines from a pod's container in a Kubernetes cluster.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cluster": "<cluster>",
"namespace": "<namespace>",
"pod": "<pod>"
},
"name": "kubectl_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | pod name to fetch logs for | |
| tail | No | number of most recent log lines to return (default: all available) | |
| cluster | Yes | the inventory kubernetes cluster name | |
| container | No | container name (default: the pod's only/first container) | |
| namespace | Yes | namespace the pod is in |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | ||
| logs | Yes | ||
| cluster | Yes | ||
| container | No | ||
| namespace | Yes | ||
| timestamp | Yes | ||
| line_count | Yes |