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
|Displays the namespace, pod and container, and decorates it with color depending on –color|
|Only outputs the log message itself, useful when your logs are json and you want to pipe them to |
|Marshals the log struct to json. Useful for programmatic purposes|
stern is written in Go 😀