Stern: Multi pod and container log tailing for Kubernetes
Stern is a tool for tailing logs from multiple pods and containers in Kubernetes. It allows you to follow log output from several pods simultaneously, with support for regex-based pod selection, color-coded output, and flexible filtering options. This makes debugging and monitoring distributed applications on Kubernetes much more efficient.
背景メモ
Kubernetesで複数のPodやコンテナのログをリアルタイムに追跡するためのCLIツール「Stern」のGitHubリポジトリ。標準の`kubectl logs`では1つのPodしか指定できず、ラベルセレクタによるフィルタリングもできないが、Sternは正規表現でPod名を指定し、複数のPodのログを色分けして同時にストリーミング表示できる。Go言語で書かれており、kubectlプラグインとしても動作。Kubernetesのトラブルシューティングや開発時のデバッグで頻繁に使われ、類似ツール(kubetail, kail)と並んで実用性の高さから広く使われているOSSプロジェクト。