Kubernetes logging starts from one convention: containers should write logs to standard output (stdout) and standard error (stderr). The container runtime captures both streams and writes them to files on the node, and kubectl logs reads those files through the kubelet. Anything an application writes to a file inside its own container filesystem is invisible to kubectl logs.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 6 more sections, 4 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.