Where do container logs live and how do you ship them?
BeginnerProductionObservability & Day-2 Operations
Answer
The container runtime writes stdout/stderr to files under /var/log/pods and /var/log/containers on the node; kubectl logs reads from there and rotation is limited by kubelet settings. A DaemonSet agent (Fluent Bit) tails those files, enriches with Pod metadata and forwards to a central store. Apps should log to stdout in JSON.
More on Observability & Day-2 Operations
What are the three pillars of observability and the standard tools on Kubernetes?BeginnerWhat is kube-state-metrics and how does it differ from metrics-server?BeginnerWhich alerts do you set up first on a cluster?BeginnerWhat is the difference between `kubectl logs --previous` and `kubectl logs -f`?BeginnerWhat does a good runbook for a Kubernetes alert include?BeginnerHow do you collect cluster events and why?Beginner