2025-03-14 21:59:59 -06:00
|
|
|
# stern
|
|
|
|
|
|
|
|
|
|
> Tail multiple pods and containers from Kubernetes.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://github.com/stern/stern#usage>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Tail all pods within a current namespace:
|
|
|
|
|
|
|
|
|
|
`stern .`
|
|
|
|
|
|
|
|
|
|
- Tail all pods with a specific status:
|
|
|
|
|
|
|
|
|
|
`stern . --container-state {{running|waiting|terminated}}`
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
- Tail all pods that matches a given `regex`:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`stern {{pod_query}}`
|
|
|
|
|
|
|
|
|
|
- Tail matched pods from all namespaces:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`stern {{pod_query}} {{[-A|--all-namespaces]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Tail matched pods from 15 minutes ago:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`stern {{pod_query}} {{[-s|--since]}} 15m`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Tail matched pods with a specific label:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`stern {{pod_query}} {{[-l|--selector]}} {{release=canary}}`
|