1

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.

gcstr
  • 125
  • 5
  • 1
    If your Kubernetes cluster spawns across different nodes you need to look on the node that actually runs the `pod`. Use `kubectl get pods --output wide` to find the right node. – webwurst Feb 17 '18 at 01:30

1 Answers1

1

You can see the log file path using:

docker inspect --format='{{.LogPath}}' $INSTANCE_ID

kurkop
  • 391
  • 2
  • 7