Skip to main content

Tail multiple pods and containers from Kubernetes with stern.

# To tail all pods within a current namespace:
stern .

# To tail all pods with a specific status:
stern . --container-state <running|waiting|terminated>

# To tail all pods that matches a given regular expression:
stern <pod_query>

# To tail matched pods from all namespaces:
stern <pod_query> --all-namespaces

# To tail matched pods from 15 minutes ago:
stern <pod_query> --since <15m>

# To tail matched pods with a specific label:
stern <pod_query> --selector <release=canary>