Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Stern: Multi pod and container log tailing for Kubernetes

Stern is a tool that allows users to tail logs from multiple pods and containers in Kubernetes, with support for color-coded output, regex-based pod selection, and customizable options for log streaming.

Background

Stern is an open-source command-line tool that lets you tail (follow in real time) logs from multiple pods and containers running on Kubernetes clusters. Kubernetes itself can be complex: a single application may run across many "pods" (the smallest deployable units), and a pod can contain multiple containers. Stern simplifies debugging by letting you use regex patterns to select which pods to stream logs from, instead of running separate `kubectl logs` commands for each one. It also color-codes output by pod and container, and can reconnect automatically if a pod restarts. Built by a Google engineer, it's a popular utility among developers and ops teams working with Kubernetes.