kubelog allows user to aggregate logs using cli command.
You can aggregate logs like this:
Stream logs from pod nginx with only one container:
kubelog logs nginx -n default
Stream all pod logs in a deployment, daemonset or statefulset:
kubelog logs deployment/nginx -n default
See kubelog --help
for details.
Install (and update) the package with:
$ go get github.com/didhd/kubelog/...
By default it will be in $GOPATH/bin
, if you want to change that, you can set your $GOPATH
or $GOBIN
.
Or you can build and install manually after cloning the repository.
$ go build
$ sudo cp kubelog /usr/local/bin/
Configuration follows current kubeconfig.