Kubectl logs

From NovaOrdis Knowledge Base
Revision as of 23:55, 5 August 2024 by Ovidiu (talk | contribs) (→‎Options)
(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

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