Created
March 23, 2022 21:30
-
-
Save ddrscott/b1737f54e7f4b9dbfb4622ff69179c73 to your computer and use it in GitHub Desktop.
watch all the logs from everything in a namespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl logs -fl 'app!=empty' --all-containers --max-log-requests 999 | |
# specify namespace | |
kubectl -n my_project logs -fl 'app!=empty' --all-containers --max-log-requests 999 | |
# in case you have a label `app` equal to `empty` | |
kubectl -n my_project logs -fl 'any_existing_label!=a_real_value' --all-containers --max-log-requests 999 | |
kubectl -n my_project logs -fl 'foo!=bar' --all-containers --max-log-requests 999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason,
logs
require the user to specify a specific Pod or label. This makes it a pain when there's any number of Pods that may be causing an issue or we want to see the logs in the context of other pod logs.These commands allow us to see everything from
kubectl
without setting up other logging infrastructure, yet.