-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should it be possible to set up log shipping to elastic via fluentd? #356
Comments
I'll answer my own question in case others attempt the same. It is possible with https://github.com/fluent/fluentd-kubernetes-daemonset, but there were a number of gotchas. The fluentd logs started filling up with infinite backslashes ("\\\\\\...."). Issues fluent/fluentd-kubernetes-daemonset#186 and openshift/origin-aggregated-logging#1423 (comment) suggested that fluentd was processing its own logs which resulted in a recursive behaviour. To solve this, I had to add The second gotcha was that unlike docker, containerd doesn't produce logs in a json format, but a custom one, e.g.
Additionally I had elastic search in the same docker-compose.yml as k3s and I could access it from the k3s container via its service name (e.g. To fix this I used a combination of |
Thanks a lot @e-nikolov! You saved my ass. |
I think we can document this better in the future |
As docker in no longer the CRI layer for K3s, containerd is, this Issue is very OOD and no docs change is necessary. Users should be able to get fluentd working with K3s by following https://docs.fluentd.org/v/0.12/articles/kubernetes-fluentd and fluent/fluentd-kubernetes-daemonset#412 |
Not sure how to ask my question in a better way, basically has anyone managed to set up fluentd with k3s for log shipping?
The text was updated successfully, but these errors were encountered: