Kubectl logs

From NovaOrdis Knowledge Base
Revision as of 23:54, 5 August 2024 by Ovidiu (talk | contribs) (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.")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

kubectl logs -f -c <container-name> <pod-name>

Options

<t>-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.