Crashed/restarted container: kubectl logs --previous <pod> -c <container> shows the prior instance's output — often the only place the crash reason appears
By label across pods: kubectl logs -l app=<label> --prefix — returns logs from ALL matching pods; --prefix labels each line with its pod/container source
Time-bounded: --since=1h (relative) or --since-time=<RFC3339 timestamp> (absolute); add --timestamps to prefix each line with its time
All containers of a pod: kubectl logs <pod> --all-containers
Init container logs: kubectl logs <pod> -c <init-container-name> (fetch them explicitly by name when diagnosing pods stuck in Init)
Official docs: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_logs/
Known gotchas
--tail default changes with selectors: no selector → all lines (-1); with -l → only 10 lines per pod. Pass --tail explicitly when using label selectors or you will silently miss history
--max-log-requests (default 5) caps concurrent streams when following with a selector; following more pods than that requires raising it
--previous only works if that container actually restarted, and only the immediately previous instance is kept
Logs live on the node with the pod: once a pod is deleted (not just restarted) its logs are gone — capture logs before deleting, and use a log aggregator for anything you must keep
-f starts from the tail position; establish history first with --tail/--since if you need context before streaming
Give your agent this knowledge — and 17,100+ more routes
One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?