Standard output (stdout) is the normal textual output stream produced by a container process. Kubernetes exposes it through kubectl logs, alongside standard error (stderr), making it a primary path for inspecting container behavior. section 8.1.1
Use container names to inspect standard output in multi-container pods:
- Run kubectl logs busybox -c busybox to view one container's output. section 8.1.1
- Run kubectl logs busybox -c sidecar to view the sidecar container's output. section 8.1.1
- Run kubectl logs busybox --all-containers to combine output from every container in the pod. section 8.1.1
Two containers writing stdout
A BusyBox container repeatedly prints a timestamp and “I am a busybox container”; a sidecar prints its own message. kubectl logs distinguishes their streams with -c. section 8.1.1
root@kind-control-plane:/# kubectl logs busybox -c busybox Tue Dec 6 14:36:26 UTC 2022: I am a busybox container Tue Dec 6 14:36:31 UTC 2022: I am a busybox container Tue Dec 6 14:36:36 UTC 2022: I am a busybox container Tue Dec 6 14:36:41 UTC 2022: I am a busybox container
Inspect representative stdout lines emitted by the busybox container. section 8.1.1





