get_logs
Fetch sanitized Kubernetes container logs for a service or pod, with grep, time-window, and previous-instance options to diagnose crashes and errors.
Instructions
Sanitized, size-capped container logs for a service (up to 10 pods) or a pod. Use previous=true for the crashed container. grep accepts a substring or /regex/i.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | No | Exact pod name (alternative to service) | |
| grep | No | ||
| tail | No | Lines per pod (max 500) | |
| since | No | Time window like 15m, 2h, 1d (default all recent) | |
| service | No | Workload name as you would say it: a Deployment, StatefulSet, DaemonSet, Service, or Pod name | |
| previous | No | ||
| container | No | ||
| namespace | No | Kubernetes namespace (required: no default configured; see list_namespaces) |