# stern/stern

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/stern-stern).**

4,747 stars · 171 forks · Go · Apache-2.0

## Links

- GitHub: https://github.com/stern/stern
- awesome-repositories: https://awesome-repositories.com/repository/stern-stern.md

## Topics

`debugging` `devops` `kubernetes` `logging` `logs` `tail`

## Description

Stern is a Kubernetes command-line debugging tool and log aggregator designed for streaming and filtering logs from multiple pods and containers. It functions as a log tailing utility that consolidates real-time data from distributed resources into a single, color-coded output.

The tool uses regular expressions to select pods and filter log content, allowing for the isolation of specific system events. It automatically tracks the lifecycle of resources, using a watch mechanism to attach to new pods that match filter criteria and removing deleted ones from the active view.

Capabilities include filtering log streams by Kubernetes metadata, labels, and namespaces, as well as restricting output to specific resource types like deployments or jobs. The utility provides options for template-driven output formatting, content highlighting, and the ability to parse local logs from standard input.

## Tags

### System Administration & Monitoring

- [Log Aggregation](https://awesome-repositories.com/f/system-administration-monitoring/log-aggregation.md) — Consolidates real-time log streams from multiple distributed pods and containers into a single output.
- [Container Log Streaming](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/infrastructure-monitoring/kubernetes-monitors/cluster-event-logging/container-log-streaming.md) — Provides real-time streaming and filtering of logs from multiple pods and containers within a Kubernetes cluster. ([source](https://github.com/stern/stern/blob/master/CHANGELOG.md))
- [Log Event Filters](https://awesome-repositories.com/f/system-administration-monitoring/audit-log-filters/log-event-filters.md) — Isolates relevant information by including or excluding log lines that match specific regular expression patterns. ([source](https://github.com/stern/stern/blob/master/README.md))
- [Distributed Log Aggregation](https://awesome-repositories.com/f/system-administration-monitoring/distributed-log-aggregation.md) — Unifies log streams from multiple distributed Kubernetes resources into a color-coded view.
- [Distributed Monitoring Tools](https://awesome-repositories.com/f/system-administration-monitoring/distributed-monitoring-tools.md) — Provides tools for tracking log output across distributed sets of pods in real time.
- [Log Event Filtering](https://awesome-repositories.com/f/system-administration-monitoring/log-event-filtering.md) — Isolates relevant system events by filtering log streams based on specific nodes, container states, or pod conditions. ([source](https://github.com/stern/stern/blob/master/CHANGELOG.md))
- [Kubernetes Stream Tailing](https://awesome-repositories.com/f/system-administration-monitoring/log-file-tailing/kubernetes-stream-tailing.md) — Streams and filters logs from multiple pods and containers using regular expressions.
- [Log Stream Management](https://awesome-repositories.com/f/system-administration-monitoring/log-stream-management.md) — Manages continuous log streams by automatically adding new resources and removing deleted ones from the active view. ([source](https://github.com/stern/stern#readme))
- [Deployment Log Filters](https://awesome-repositories.com/f/system-administration-monitoring/logging-and-telemetry/log-search-engines/deployment-log-filters.md) — Narrows the search scope by restricting log output to specific resource types like deployments or jobs. ([source](https://github.com/stern/stern/blob/master/CHANGELOG.md))
- [Namespace-Based Log Filtering](https://awesome-repositories.com/f/system-administration-monitoring/namespace-based-log-filtering.md) — Filters massive amounts of container output by namespaces, labels, and content patterns.
- [Real-Time Application Log Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/real-time-application-log-monitoring.md) — Streams data from multiple Kubernetes sources simultaneously with color coding for real-time debugging. ([source](https://github.com/stern/stern#readme))
- [Log Output Formatting](https://awesome-repositories.com/f/system-administration-monitoring/log-output-formatting.md) — Transforms log data into raw text, JSON, or custom templates to control output formatting. ([source](https://github.com/stern/stern#readme))
- [Regex-Based Log Filtering](https://awesome-repositories.com/f/system-administration-monitoring/regex-based-log-filtering.md) — Uses regular expressions to include or exclude specific log content from Kubernetes streams.

### Business & Productivity Software

- [Kubernetes Workload Label Filters](https://awesome-repositories.com/f/business-productivity-software/tag-filtering-systems/label-based-filtering/kubernetes-workload-label-filters.md) — Restricts output based on labels, namespaces, or status conditions to isolate specific resources in large environments. ([source](https://github.com/stern/stern/blob/master/README.md))

### Development Tools & Productivity

- [Log-Based Debugging](https://awesome-repositories.com/f/development-tools-productivity/application-debugging/remote-debugging/kubernetes-pod-debugging/log-based-debugging.md) — Enables isolating errors across cluster resources using metadata filters and regular expressions.
- [Resource Pattern Selection](https://awesome-repositories.com/f/development-tools-productivity/file-pattern-matching/regex-based-file-selection/resource-pattern-selection.md) — Identifies and tracks pods by matching resource names against regular expression patterns for dynamic stream management.
- [Integrated Kubernetes Debugging Tools](https://awesome-repositories.com/f/development-tools-productivity/application-debugging/remote-debugging/kubernetes-pod-debugging/integrated-kubernetes-debugging-tools.md) — Provides a single-interface CLI for streaming logs and monitoring Kubernetes workloads.
- [Log Output Templates](https://awesome-repositories.com/f/development-tools-productivity/log-output-templates.md) — Processes log lines through a customizable engine to apply colors and structure based on metadata.

### DevOps & Infrastructure

- [Dynamic Resource Watching](https://awesome-repositories.com/f/devops-infrastructure/kubernetes-cluster-management/resource-controllers/dynamic-resource-watching.md) — Uses the Kubernetes watch API to automatically detect and attach to new pods matching filter criteria.
- [Dynamic Pod Pattern Tracking](https://awesome-repositories.com/f/devops-infrastructure/pod-and-namespace-label-filtering/dynamic-pod-pattern-tracking.md) — Maintains an accurate resource list by selecting pods using regular expressions and automatically tracking new items. ([source](https://github.com/stern/stern/blob/master/README.md))

### Software Engineering & Architecture

- [Asynchronous Log Streaming](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/reactive-messaging/reactive-event-driven-systems/asynchronous-data-processing/asynchronous-log-streaming.md) — Utilizes asynchronous log streaming to maintain persistent connections to multiple pods simultaneously.

### Networking & Communication

- [Stream Multiplexing](https://awesome-repositories.com/f/networking-communication/peer-to-peer-streaming/stream-multiplexing.md) — Aggregates multiple asynchronous log streams from different containers into a single synchronized output stream.

### User Interface & Experience

- [Log Syntax Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/log-syntax-highlighting.md) — Accelerates visual scanning by marking specific strings and distinguishing data sources using configurable colors. ([source](https://github.com/stern/stern/blob/master/CHANGELOG.md))

### Part of an Awesome List

- [Command Line Tools](https://awesome-repositories.com/f/awesome-lists/devtools/command-line-tools.md) — Tails logs from multiple pods and containers simultaneously.
