Tail logs from all pods in a Kubernetes deployment at once with color-coded output to tell them apart at a glance.
Filter live pod log output to lines matching a pattern while piping the rest into jq or another log processor.
Automatically pick up logs from newly started or replaced pods without restarting the watch command.
| stern/stern | deckarep/golang-set | werf/werf | |
|---|---|---|---|
| Stars | 4,681 | 4,679 | 4,684 |
| Language | Go | Go | Go |
| Setup difficulty | easy | easy | hard |
| Complexity | 2/5 | 2/5 | 4/5 |
| Audience | ops devops | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires kubectl configured with access to a Kubernetes cluster, no additional setup needed after installation.
Stern is a command-line tool for reading log output from applications running in Kubernetes. In Kubernetes, applications run inside units called pods, and a pod can contain multiple containers. The built-in Kubernetes tools let you read logs from one container at a time, which becomes tedious when you are trying to follow what is happening across many pods at once. Stern solves this by letting you tail logs from multiple pods and containers simultaneously in a single terminal window. You identify which pods to watch by giving Stern a search pattern. This can be a regular expression matching pod names, or a reference to a Kubernetes resource like a deployment or a job, and Stern will automatically find all the pods that belong to it. If a pod is replaced or a new one starts, Stern picks it up automatically without you needing to restart the command. Each pod and container gets a different color in the output so you can tell them apart at a glance. The tool has a wide range of filtering options. You can limit output to logs matching a certain pattern, exclude lines you do not care about, filter by which containers are running or which namespace they belong to, and choose how far back in time to pull logs. Output format can be plain text, JSON, or a custom template if you need to pipe the output into another tool. Installation is available through several standard package managers including Homebrew on macOS and Linux, WinGet on Windows, Krew for Kubernetes plugin users, and asdf. You can also download a pre-built binary directly or build it from source using Go. This is a maintained community fork of an older project called wercker/stern, which was discontinued. The license and full README are in the repository.
Stern is a command-line tool that streams logs from multiple Kubernetes pods and containers simultaneously in one terminal window, with color-coded output and filters so you stop juggling separate log commands per pod.
Mainly Go. The stack also includes Go, Kubernetes.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Verify against the repo before relying on details.