Homebrew

Completion

The easiest option is to install kubetail from homebrew to dynamically display the pods names on $ kubetail <tab>. Alternatively install any of the completion scripts (bash/zsh/fish) manually. For example:

To tail only a specific container from multiple pods specify the container like this:

$ kubetail app2 -c container1

You can repeat -c to tail multiple specific containers:

$ kubetail app2 -c container1 -c container2

To tail multiple applications at the same time seperate them by comma:

$ kubetail app1,app2

For advanced matching you can use regular expressions:

$ kubetail "^app1|.*my-demo.*" --regex

Supply -h for help and additional options:

$ kubetail -h

Colors

By using the -k argument you can specify how kubetail makes use of colors (only applicable when tailing multiple pods).

Value

Description

pod

Only the pod name is colorized but the logged text is using the terminal default color

line

The entire line is colorized (default)

false

Don't colorize the output at all

Example:

$ kubetail app2 -k false

Filtering / Highlighting etc

kubetail itself doesn't have filtering or highlighting capabilities built-in. If you're on MacOSX I recommend using iTerm2 which allows for continuous highlighting of search terms, good scrolling capabilities and multitab arrangements. Another useful feature of iTerm2 is the "timeline" (cmd + shift + e) which lets you display a timeline in your own local timezone next to the logs (that are typically in UTC).

If you're not using iTerm2 or think that kubetail is lacking in features there's a fork of kubetail made by Alan Stebbens that allows for richer configuration and uses multitail and bash-lib. Alan has been kind enough to provide a pull request but my current thinking is that I'd like kubetail to stay simple and small and not use any dependencies.

Environment

kubetail can take default option values from environment variables matching the option name.