Collect log files from kubernets pods

Hi @bigflagburito ,

I take it this just mean that the logs are not discovered by your kubernetes_sd_configs. Even with kubernetes_sd_configs Promtail is really only tailing log files written to the local file system of the worker node.

For me that means that Promtail mounts the following paths

      - hostPath:
          path: /var/lib/docker/containers
          type: ""
        name: containers
      - hostPath:
          path: /var/log/pods
          type: ""
        name: pods

If you wanted to, you should be able to mount /var/log/ or /var/log/<program_name> and use static_configs to pick up the logs.

1 Like