Kubectl logs: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * kubectl =Overview= <syntaxhighlight lang='bash'> kubectl logs -f -c <container-name> <pod-name> </syntaxhighlight> =Options= ==<t>-f</tt>== Streams the logs ==<tt>-c</tt>== In case of multi-container pods, it is a good idea to specify the container you want to monitor, otherwise you'll see the logs produced by the first one, which may not what you want to see.") |
|||
Line 8: | Line 8: | ||
=Options= | =Options= | ||
==< | ==<tt>-f</tt>== | ||
Streams the logs | Streams the logs | ||
==<tt>-c</tt>== | ==<tt>-c</tt>== | ||
In case of multi-container pods, it is a good idea to specify the container you want to monitor, otherwise you'll see the logs produced by the first one, which may not what you want to see. | In case of multi-container pods, it is a good idea to specify the container you want to monitor, otherwise you'll see the logs produced by the first one, which may not what you want to see. |
Latest revision as of 23:55, 5 August 2024
Internal
Overview
kubectl logs -f -c <container-name> <pod-name>
Options
-f
Streams the logs
-c
In case of multi-container pods, it is a good idea to specify the container you want to monitor, otherwise you'll see the logs produced by the first one, which may not what you want to see.