mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-25 02:39:25 +03:00
stern: add page (#3517)
This commit is contained in:
parent
2ccebb2820
commit
0a1b47ed6f
24
pages/osx/stern.md
Normal file
24
pages/osx/stern.md
Normal file
@ -0,0 +1,24 @@
|
||||
# Stern
|
||||
|
||||
> Tail Logs from multiple pods and multiple containers on Kubernetes.
|
||||
> More information: <https://github.com/wercker/stern>.
|
||||
|
||||
- Tail logs from a specific namespace:
|
||||
|
||||
`stern {{pod_name}} --container {{container}} --namespace {{namespace}}`
|
||||
|
||||
- Tail logs using a particular configuration file:
|
||||
|
||||
`stern {{pod_name}} --container {{container}} --kubeconfig {{path/to/kubeconfig_file}}`
|
||||
|
||||
- Display the last 2 hours worth of logs, tailing for newer ones:
|
||||
|
||||
`stern {{pod_name}} --container {{container}} --since {{2h}}`
|
||||
|
||||
- Tail logs from pods that have specific labels across all namespaces:
|
||||
|
||||
`stern --container {{container}} -l "{{KEY1=VALUE1,KEY2=VALUE2}}" --all-namespaces`
|
||||
|
||||
- Tail logs from containers whose name starts with "XYZ":
|
||||
|
||||
`stern {{pod_name}} --container "{{XYZ*}}"`
|
Loading…
Reference in New Issue
Block a user