kubectl_logs
Retrieve logs from Kubernetes pods, deployments, jobs, or cronjobs with options for container selection, line count, time filters, and timestamps.
Instructions
Get logs from Kubernetes resources like pods, deployments, or jobs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the resource | |
| tail | No | Number of lines to show from end of logs | |
| since | No | Show logs since relative time (e.g. '5s', '2m', '3h') | |
| follow | No | Follow logs output (not recommended, may cause timeouts) | |
| context | No | Kubeconfig Context to use for the command (optional - defaults to null) | |
| previous | No | Include logs from previously terminated containers | |
| container | No | Container name (required when pod has multiple containers) | |
| namespace | Yes | Kubernetes namespace | default |
| sinceTime | No | Show logs since absolute time (RFC3339) | |
| timestamps | No | Include timestamps in logs | |
| resourceType | Yes | Type of resource to get logs from | |
| labelSelector | No | Filter resources by label selector |