Forrest logo
back to the stern tool

stern:tldr:45be1

stern: Tail all pods with a specific status.
$ stern . --container-state ${select}
try on your machine

The command "stern . --container-state ${select}" is likely used to monitor and view logs of containers running inside a Kubernetes cluster. Stern is a command-line utility designed for tailing and searching logs.

Here's a breakdown of the command:

  • "stern" is the executable command.
  • "." refers to the current directory where stern is executed.
  • "--container-state" is a flag or option used to specify the container state to filter the logs. "${select}" is a placeholder variable that is expected to be substituted with an actual container state value like "running", "terminated", or "waiting".
    • For example: "--container-state running" will only display logs for containers that are currently running.
  • The command will likely connect to the Kubernetes cluster and start streaming the logs that match the provided container state filter in real-time.

Make sure to replace "${select}" with an actual container state value when executing the command.

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