Where are Kubernetes' pods logfiles?
问题 When I run $ kubectl logs <container> I get the logs of my pods. But where are the files for those logs? Some sources says /var/log/containers/ others says /var/lib/docker/containers/ but I couldn't find my actual application's or pod's log. 回答1: The on-disk filename comes from docker inspect $pod_name_or_sha | jq -r '.[0].LogPath' assuming the docker daemon's configuration is the default {"log-driver": "json-file"} , which is almost guaranteed to be true if kubectl logs behaves correctly.