get_pod_logs
Retrieve container logs from a pod. Use the previous flag to access logs from a crashed instance, aiding in debugging CrashLoopBackOff.
Instructions
Tail a container's logs. Set previous=true to read the prior (crashed) instance's logs — essential for CrashLoopBackOff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Pod name. | |
| lines | No | How many lines to tail (default 100). | |
| context | No | Kubeconfig context to target; omit for the server's default context. | |
| previous | No | Read logs from the previous, crashed container instance. | |
| container | No | Container name; required only for multi-container pods. | |
| namespace | Yes | Namespace of the pod. |