Forrest logo
back to the stern tool

stern:tldr:5d493

stern: Tail matched pods from all namespaces.
$ stern ${pod_query} --all-namespaces
try on your machine

This command utilizes the stern tool to stream logs from multiple pods in all namespaces.

Here is the breakdown of the command:

  • stern: stern is a tool used for tailing and filtering logs from multiple Kubernetes pods.
  • ${pod_query}: This is a placeholder for the query parameter that specifies which pods to stream the logs from. The actual value for this parameter needs to be provided when running the command. The query can be formed using label selectors, pod names, or any other field in the pod metadata.
  • --all-namespaces: This flag tells stern to include pods from all namespaces. By default, stern only streams logs from pods in the current namespace.

Overall, this command is used to stream logs from pods in all namespaces, with the specific pods determined by the ${pod_query} parameter.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the stern tool