https://github.com/jbvmio/kubetail
Repository for kubetail - The pod log tailer
https://github.com/jbvmio/kubetail
channelrouter kubernetes logs pod pods tail
Last synced: 2 months ago
JSON representation
Repository for kubetail - The pod log tailer
- Host: GitHub
- URL: https://github.com/jbvmio/kubetail
- Owner: jbvmio
- License: apache-2.0
- Created: 2018-08-13T15:22:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-10T19:55:52.000Z (about 7 years ago)
- Last Synced: 2024-06-20T07:59:16.272Z (about 2 years ago)
- Topics: channelrouter, kubernetes, logs, pod, pods, tail
- Language: Go
- Homepage: http://jbvm.io
- Size: 7.07 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubetail
**v1.0.0 Released**
https://github.com/jbvmio/kubetail/releases
kubetail is a utility written in go enabling a straight forward way to immediately begin tailing logs from multiple Kubernetes pods using whitelist, blacklist terms if desired. Searches and returns results using podnames as a wildcard search, optionally adding a prefixed header.
All pods that contain the search terms as a substring will be returned.
**Examples:**
```
kubetail -i apache nginx // Tails logs from pods containing "apache" or "nginx", adding an id header.
kubetail -i pod1 pod2 --tail 20 // Tails pod1 and pod2 beginning with the last 20 lines.
kubetail --in-cluster pod1 // Use --in-cluster flag if running within a Pod itself.
```
**Using white-list (--grep) and black-list (--vgrep) filters:**
```
kubetail -i apache nginx --vgrep 'GET,connection refused'
kubetail -i apache nginx --grep "example.com,mysite.com" --vgrep POST
```
The latter will tail logs from any pod with "apache" or "nginx" in it's name, filtering for anything containing
either example.com or mysite.com but not containing the word POST.
**Filter order is determined by the order entered on the command line:**
```
kubetail -i apache nginx --grep example.com --vgrep POST // Filters for lines containing example.com first, then filters out any lines containing POST
kubetail -i apache nginx --vgrep POST --grep example.com // Filters out any lines containing POST first, then filters for lines containing example.com
```
**Flags:**
```
--in-cluster enables kubetail to be used inside a pod.
-i, --id display the pod name as a header along with the output.
--grep strings only display lines matching the specified text. Use a comma seperated string for multiple args.
--vgrep strings exclude any lines matching the specified text. Use a comma seperated string for multiple args.
--tail int start tail with defined no. of lines. (default 2)
-h, --help help for kubetail
```