get_pod_logs
Retrieve Kubernetes pod logs with options for namespace, line count, container selection, previous instance, and cluster configuration.
Instructions
获取Pod的日志
Args: name: Pod名称 namespace: Kubernetes命名空间,默认为default lines: 日志行数,默认为100 container: 容器名称,如果Pod有多个容器则需要指定 previous: 是否获取上一实例(崩溃/重启前)的日志,默认为False kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用
Returns: 包含Pod日志的结果
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": {
"name": "<name>"
},
"name": "get_pod_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| lines | No | ||
| previous | No | ||
| container | No | ||
| namespace | No | default | |
| cluster_name | No | ||
| kubeconfig_path | No |