-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi, thanks for sharing this great OSS :)
I have recently tested cluster logging as described in http://kubernetes.io/docs/getting-started-guides/logging/ with localkube and unfortunately I couldn't make fluentd collect any log or send it.
After some debugging, I have realized that my fluentd pods were unable to find any kubernetes related log under /var/log which kubelet/localkube is expected to write kubernetes(/var/log/*.log) and its pods' logs(/var/log/containers/*.log) to.
I believe that we can make localkube mount /var/log to allow fluentd collect logs from localkube/kubelet.
More concretely, with the following change and running localkube via make run-image, I have confirmed that fluentd can do the job:
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ DOCKER_DIR := /go/src/$(PKG)
MNT_ROOT ?= -v "/:/rootfs:ro"
MNT_SYS ?= -v "/sys:/sys:rw"
-MNT_DOCKER_LIB ?= -v "/var/lib/docker:/var/lib/docker" -v "/mnt/sda1/var/lib/docker:/mnt/sda1/var/lib/docker"
+MNT_DOCKER_LIB ?= -v "/var/lib/docker:/var/lib/docker" -v "/mnt/sda1/var/lib/docker:/mnt/sda1/var/lib/docker" -v "/var/log:/var/log"
MNT_KUBELET_LIB ?= -v "/var/lib/kubelet:/var/lib/kubelet"
MNT_RUN ?= -v "/var/run:/var/run:rw"
Has anyone encountered this issue, too?
Could you share your experience e.g. how you had resolved the issue (w/ the same fix as I had done or another way?)