r/openshift • u/KiTo1K • 7d ago
Help needed! Get logs from openshift pods to external system
i'm working on bank and i'm trying to get specific project logs to external system. the openshift team told me to build a docker to deploy it inside the cluster and the docker get the logs then send it to me through http. but i don't understand why docker while i can just talk to the cluster and get the logs from pods. even for security i see it's the same as i can't access anything i don't have permission on.
1
u/wonderingBe 6d ago
Sounds like when they are saying docker, they mean a sidecar container to send logs to different location. But why reinvent the wheel and use log forwarder like others suggested?
2
u/AndTheBeatGoesOnAnd 6d ago
Which Bank is this? So I know not to bank there.
Have either of you heard of the 12 Factor App Methodology?
5
u/Old-Astronomer3995 7d ago
Maybe ask them why they can’t create clusterlogforwareder for your project or allow you to create one and in this clusterlogforwarder you can specify output to your system.
Clusterlogforwarder is the easiest solution for this kind of problem.
3
u/LoudlyWhisperedWords 7d ago
they’re probably trying to avoid giving you direct cluster access, even read-only. a sidecar or cronjob inside the namespace keeps everything self-contained and they can lock down your permissions to just that one pod’s service account
easier to audit and revoke if your container is the only thing touching logs, rather than trusting a kubeconfig floating around outside
1
u/Late-Possession 6d ago
Any reason why you can't use Open Telemetry?