-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
kubelet does not create symlinks to /var/log/containers #39225
Comments
I changed fluentd-es.yaml as following: But when i run a pod "named gateway", i got in the fluentd log the next error: |
Finally i found out what was causing the issue. when installing docker from CentOS 7 repo, there is an option (--log-driver=journald) which force docker to run log output to journald. The default behavior is to write these logs to json.log files.So, the only thing i had to do, delete the last mentioned option from /etc/sysconfig/docker. |
Isn't it a way to make it work with journald? |
i have the same problem in my openshift cluster. I guess the journald way is the only supported "Aggregated logging is only supported using the journald driver in Docker. See Updating Fluentd’s Log Source After a Docker Log Driver Update for more information." |
@helletheone More recent versions of docker write logs directly to journald. I've changed docker daemon to write logs as json.logs and now I'm able to use Filebeat (or FluentD if you prefer) just fine. |
How to resolve this issue or set OPTIONS='--log-driver=journald' in k8s? Levi |
I am trying to set up EFK stack on my k8s cluster using ansible repo.
When i tried to browse kibana dashboard it shows me next output:
![kibana](https://cloud.githubusercontent.com/assets/5040743/21469979/a37e4ecc-ca83-11e6-92da-e69632fc51b2.png)
After making some research, i found out that i don't have any log detected by Fluentd.
I am running k8s 1.2.4 on minions and 1.2.0 on master.
What i succeeded to understand, is that kubelet creates /var/log/containers directory, and make symlinks from all containers running in the cluster into it. After that Fluentd mounts share /var/log volume from the minion and have eventually access to all logs containers. So , it can send these logs to elastic search.
In my case i had /var/log/containers created, but it is empty, even /var/lib/docker/containers does not contain any log file.
I used to use the following controllers and services for EFK stack setup:
es-controller.txt
es-service.txt
fluentd-es-ds.txt
kibana-controller.txt
kibana-service.txt
What was missing or doing wrong right now ?
The text was updated successfully, but these errors were encountered: