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
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. |