1

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?

Loïc
  • 11
  • 4

1 Answers1

0

Thanks for your reply. For you, there is no contraindication to retrieve the logs via the api ? On many pods, if i have a sidecar that retrieves the logs permanently from the api, Is there a consumption risk for the Kubernetes cluster?

I know solutions indicated on this link (with Cluster-level logging architectures), but no information related to the retrieving logs from API Kubernetes

Loïc
  • 11
  • 4