MrE
MrE

Reputation: 20808

log4j container logging on Kubernetes

Does anyone know how to redirect log4j logs to central Kubernetes logging

Testing on GKE right now but as I understand Kubernetes uses Fluentd by default, doesn't it?

Thanks for help.

Upvotes: 0

Views: 3566

Answers (2)

Nitish T
Nitish T

Reputation: 162

We're building a product that allows pulling logs from Kubernetes pods based on a simple configuration: https://github.com/parseablehq/collector

This would allow pulling logs from a container logging in Log4J format.

Upvotes: 0

Alex Robinson
Alex Robinson

Reputation: 13397

All you have to do is configure log4j to send its logs to stdout and/or stderr. That'll cause them to be shipped to whichever central logging service your cluster was configured with (Google Cloud Logging if you're on GKE).

Upvotes: 2

Related Questions