LoginSignup
0
0

More than 3 years have passed since last update.

kubernetesでlogを一気に見る方法

Last updated at Posted at 2020-07-17

tl; dr

  • k8sでログを簡単にみれるやり方(mac)
  • 非常に簡単なのでやって損はない

困っていること

daemonsetでfluentdを設定したけど、logsを一気に見たい

やり方

brew install stern

実行できるか、バージョン確認

stern -v

今使っているpodからみたい集合体を選ぶ
例えばこんな感じのがあるとします

$kube-ctl get po
fluentd-q4nfr                        1/1     Running   0          30m
fluentd-wq77d                        1/1     Running   0          29m
fluentd-zf9ct                        1/1     Running   0          30m

こんな感じのコマンドで一気にみることができる

stern fluentd-*

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0