get_workload_logs
Aggregate and filter logs from all pods of a deployment, statefulset, or daemonset. Automatically collects errors, warnings, and panics across replicas, with optional pattern-based filtering.
Instructions
Get aggregated logs from all pods of a workload (Deployment, StatefulSet, or DaemonSet). Logs are collected from all matching pods concurrently, then server-side filtered to errors, warnings, panics, and stack traces using deterministic regex patterns and deduplicated. Set grep for additional server-side filtering before that summary stage, like kubectl logs | grep PATTERN. More useful than get_pod_logs when you need logs across all replicas of a workload. If the target is a config value, feature flag, CRD field, env ref, or YAML/spec content, use search rather than logs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | workload kind: deployment, statefulset, or daemonset. Defaults to deployment when omitted. | |
| namespace | Yes | workload namespace | |
| name | Yes | workload name | |
| container | No | specific container name, defaults to all containers | |
| tail_lines | No | lines per pod (default 100) | |
| grep | No | optional regular expression to keep matching log lines before diagnostic filtering, like kubectl logs | grep PATTERN | |
| since | No | only return logs newer than this duration (e.g. 30s, 10m, 1h), like kubectl logs --since | |
| previous | No | return logs from the previous terminated container instance (e.g. for CrashLoopBackOff diagnosis), like kubectl logs -p |