Get Pod Logs
get_pod_logsRetrieve logs from a Kubernetes pod by specifying namespace and pod name. Optionally filter by container, limit to recent lines, or fetch previous instance logs.
Instructions
Get logs from a pod in a specified namespace
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": {
"namespace": "<namespace>",
"pod_name": "<pod_name>"
},
"name": "get_pod_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | The Kubernetes namespace where the pod is located. | |
| pod_name | Yes | The name of the pod to get logs from. | |
| container | No | The container name within the pod. If not specified and the pod has multiple containers, logs from the first container will be returned. | |
| tail_lines | No | Number of lines to show from the end of the logs. If not specified, all logs will be returned. | |
| previous | No | If true, return logs from a previous instantiation of the container. Default is False. |