oc_logs
Retrieve logs from OpenShift resources including pods, deployments, and builds. Filter by labels, containers, timestamps, and stream live logs to troubleshoot issues.
Instructions
Get logs from OpenShift resources like pods, deployments, builds, etc. with advanced filtering and streaming options
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the resource | |
| tail | No | Number of lines to show from end of logs (-1 for all) | |
| since | No | Show logs since relative time (e.g. 5s, 2m, 3h) or absolute time | |
| follow | No | Follow logs output (stream live logs) | |
| context | No | OpenShift context to use (optional) | |
| previous | No | Show logs from previous terminated container | |
| selector | No | Label selector to filter pods | |
| container | No | Container name (for pods with multiple containers) | |
| namespace | No | OpenShift namespace/project | default |
| sinceTime | No | Show logs since absolute timestamp (RFC3339) | |
| limitBytes | No | Maximum bytes to return | |
| timestamps | No | Include timestamps in log output | |
| resourceType | No | Type of resource to get logs from | pod |
| allContainers | No | Get logs from all containers in the pod | |
| maxLogRequests | No | Maximum number of concurrent log requests when using selectors |