-
Notifications
You must be signed in to change notification settings - Fork 465
Expose hosts' /var/log to the kubelet by default #650
Conversation
I'm in favor of this, as it fixes #322 (comment). What do you think @colhom? You are correct, the docs will need to be updated in all of the manual example manifests, etc. |
LGTM |
@robszumski I figured there was no documentation about exposing the Should I change anything there? |
I am strongly in favor of this change. @danielfm maybe update the PR title to reflect updating more than AWS |
@danielfm yes, it is documented there, but if we are going to do this by default we need to remove the example from there and add it to each of the example units in all of the guides. I think thats these, in addition to what you've already changed: https://github.com/coreos/coreos-kubernetes/blob/master/Documentation/deploy-master.md#create-the-kubelet-unit |
Nice, I think you got all of em. |
--mount volume=rkt,target=/usr/bin/rkt \ | ||
--volume var-lib-rkt,kind=host,source=/var/lib/rkt \ | ||
--mount volume=var-lib-rkt,target=/var/lib/rkt \ | ||
--volume=stage,kind=host,source=/tmp \ | ||
--mount volume=stage,target=/tmp" | ||
--volume stage,kind=host,source=/tmp \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the motivation for host mounting /tmp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our setup actually mounts in an entirely separate directory to store cursor positions for our aggregrator (currently fluentd) across pod lifecycle. I suspect maybe that's what this is for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default setup uses a file in /var/log for the cursor, which is why it's /var/log instead of just /var/log/container, so it's not for that I dont think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the motivation for host mounting
/tmp
?Our setup actually mounts in an entirely separate directory to store cursor positions for our aggregrator (currently fluentd) across pod lifecycle. I suspect maybe that's what this is for?
The /mnt
mounting already existed there; I only removed the =
there after --volume
to keep its style consistent with the other flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/tmp
is mounted in for rktnetes. It will eventually go away but for now it is needed for some communication between host rkt and containerized kubelet.
Is there anything else I need to do to get this merged? |
The kubelet creates symlinks that capture the pod name, namespace, container name & Docker container ID to the docker logs for pods in the /var/log/containers directory on the host. By mapping the volumes for those directories to the kubelet container, it becomes easier to use cluster level logging in Kubernetes, i.e., fluentd-elasticsearch.
The kubelet creates symlinks that capture the pod name, namespace, container name & Docker container ID to the docker logs for pods in the /var/log/containers directory on the host. By mapping the volumes for those directories to the kubelet container, it becomes easier to use cluster level logging in Kubernetes, i.e., fluentd-elasticsearch.
Since this is now part of the default configuration, there's no need to document it as an optional step.
I've been running my clusters with this mod for at least three months, but of course, the more people testing this the better! |
@aaronlevy these emulate exactly what i've had in a patch file for multiple months, if I find sometime I can validate exactly this PR on vagrant etc (no time for much else), but all the changes look fine to me. I personally prefer the |
Thanks @danielfm. |
The kubelet creates symlinks that capture the pod name, namespace, container name & Docker container ID to the Docker logs for pods in the
/var/log/containers
directory on the host.By mapping the volume for this directory to the kubelet container by default, it becomes easier to use cluster level logging in Kubernetes, i.e., fluentd-elasticsearch, if the user choose to (see my comment in #320).
This PR updates both single-node and multi-node configurations.
(I should probably update some documentation as well, but first I want to know how you guys feel about this.)