To implement a log alerting solution, i need to retrieve directly logs from my containers. I can't use the solution deployed on kubernetes infrastructure (fluentd or other).
I am considering to use kubectl logs command (or access to kubernetes api directly) inside a container to retrieve logs from severals pods. The "follow" option of kubectl could be used. I would an another sidecar with mtail exporter for alerting feature.
Do you have any recommendations regarding this use case? Can this be a consumer for the kubernetes cluster for example?