Reminder:
Spring Boot logs (by default) go to stdout.
Here’s where those logs actually end up in a real Kubernetes setup:
| What You’re Seeing | Where Logs Actually Go |
|---|---|
Inside your container (/var/log) |
❌ Not used for app logs |
kubectl logs <pod> |
✅ Shows stdout/stderr captured by Kubernetes |
Node filesystem (/var/log/containers/, /var/log/pods/) |
✅ Where Kubernetes stores container logs |
| External logging systems (Loki, Fluentd, etc) | ✅ If configured, logs are shipped here |
Let’s say you have a Spring Boot app running in Kubernetes.
You do something like:
System.out.println("App started");
That message needs to go somewhere. But where?
When your app prints something, it goes to:
stdout → normal outputstderr → error messagesThese are not files or folders — they’re just default destinations that the OS (Linux) gives to every program.
Think of it like this: