get_kubectl_logs
Fetch recent logs from a specific Kubernetes pod by running kubectl on a remote Linux host over SSH; target containers, previous crashed instances, or time windows for diagnosis.
Instructions
Gets the last lines log lines of a SPECIFIC kubernetes pod (kubectl logs) by running
kubectl on a remote Linux host via SSH. kubectl must be configured for the SSH user there.
container selects a container in a multi-container pod.
previous=True returns logs of the previous, crashed instance - use it for CrashLoopBackOff.
Optional since limits them to a time window: '30 min ago', '2 hours ago', '30m', '1h30m'
or an absolute UTC time 'YYYY-MM-DDTHH:MM:SSZ'.
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": {
"pod": "<pod>",
"host": "<host>",
"user": "<user>"
},
"name": "get_kubectl_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | ||
| host | Yes | ||
| port | No | ||
| user | Yes | ||
| lines | No | ||
| since | No | ||
| timeout | No | ||
| key_path | No | ||
| password | No | ||
| previous | No | ||
| container | No | ||
| namespace | No | default | |
| accept_new_hostkey | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||