get_pod_logs
Retrieve the tail of a pod's container logs, with options to read from a previous crashed instance for troubleshooting crash loops.
Instructions
Fetch the tail of a pod's container logs. Set previous=true to read logs from a crashed container's prior instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | number of lines from the end of the log to return (default 100) | |
| context | No | kubeconfig context (cluster) to target; omit to use the default context | |
| pod_name | Yes | name of the pod | |
| previous | No | return logs from the previous terminated instance of the container; useful for crash loops | |
| container | No | container name; omit for a single-container pod | |
| namespace | Yes | namespace of the pod |