Build logs to container logs

Hi,

We are using jenkins with the kubernetes agents, such that each job spins a new pod with all the containers that we need. This is working wonderfully and we don’t have problems.

At this point I’m trying to get the build logs elsewere (fluentbit) and I’m struggling to find a way to pipe the build logs of each job to the output of any of the containers. I can see that the logs are stored in the main jenkins pod, so I do understand that there is some underlying functionality sending those logs, what I would like is to also output those to stdout or stderr for example in the origin. Alternatively being able to output them in the main node would also be something, not ideal but at least a way to take those logs.

Any pointer or help would be highly appreciated.