1

When I type kubectl log pod/yourpod to get my pod's logs, behind the scene, k8s must read the log from somewhere in my pod.

What's the default path to the log generated by my container? How to change the path?

Inside my container, my process uses sigs.k8s.io/controller-runtime/pkg/log to generate logs.

Mike
  • 1,841
  • 2
  • 18
  • 34

1 Answers1

2

It is the console output (stdout / stderr) that is captured by the container runtime and made available by the kubelet running on the node to the API server.

So there is not real log file, though the container runtime usually has a means of buffering the logs to the file system.

Thomas
  • 11,272
  • 2
  • 24
  • 40