stern: Multi pod and container log tailing for Kubernetes

Stern allows you to tail multiple pods on Kubernetes and multiple containers within the pod. Each result is color coded for quicker debugging.

When a pod contains multiple containers Stern can tail all of them too without having to do this manually for each one. Simply specify the container flag to limit what containers to show. By default all containers are listened to.


brew install stern


stern supports outputting custom log messages. There are a few predefined templates which you can use by specifying the --output flag:

defaultDisplays the namespace, pod and container, and decorates it with color depending on –color
rawOnly outputs the log message itself, useful when your logs are json and you want to pipe them to jq
jsonMarshals the log struct to json. Useful for programmatic purposes


stern is written in Go 😀

A Kubernetes Developer Workflow for MacOS

Thank’s @hato