Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While the search offered is handy, I watch logs on multi-pod workloads via:

    kubectl logs -f -l app=api --max-log-requests=50
This follows along all pods with the given label (app: api) for up to 50 pods or however many you want. Quite useful when I'm looking for specific output such as ERROR logs to just pipe it to grep like this:

    kubectl logs -f -l app=api --max-log-requests=50 | grep ERROR
and get realtime filtering of all log output without having to tail individual pods by name.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: