Welcome to the Linux Foundation Forum!

Fluentd has no magic

The Lab 5.3 description contains the following detail:

We will read from a file of the webcont container and write to standard out of the fdlogger container.

This suggests that Fluentd could actually access files from another container. However, Fluentd is only able to access the files in the volumes of the container. Without a volume, containers cannot manipulate each other's file system.

A better wording could be:

"Fluentd will read the /var/log/nginx/access.log file from the weblog-pv-storage volume of the pod and print it to the standard out of the fdlogger container."

But further clarification could be added. I think it's rather important to state that the volumes mounted to the pod are accessible on the exact same path in all containers. I haven't found this fundamental info in the material yet, but I may have skipped it somewhere.


  • chrispokorni
    chrispokorni Posts: 1,458

    Hi @akovi,

    The two containers of a pod sharing a volume can mount the volume on different mount points, they are not required to mount it "on the exact same path".


  • akovi
    akovi Posts: 16

    Hi @chrispokorni, thanks for the clarification. Yes, the mounts are defined per container, so not necessarily the same in all containers. However, it is still true that Fluentd exercises no magic to access the files in the file system of the other container. It can only access whatever is mounted into its own namespace. (Unless it uses some K8A APIs, which it does not.)


Upcoming Training