LinuxCommandLibrary

stern

stern

TLDR

Tail all pods within a current namespace

$ stern .
copy


Tail all pods with a specific status
$ stern . --container-state [running|waiting|terminated]
copy


Tail all pods that matches a given regular expression
$ stern [pod_query]
copy


Tail matched pods from all namespaces
$ stern [pod_query] --all-namespaces
copy


Tail matched pods from 15 minutes ago
$ stern [pod_query] --since [15m]
copy


Tail matched pods with a specific label
$ stern [pod_query] --selector [release=canary]
copy

Copied to clipboard