troubleshoot icon indicating copy to clipboard operation
troubleshoot copied to clipboard

Can cluster resources or cluster info collector include kubelet logs from each node

Open marccampbell opened this issue 5 years ago • 3 comments

marccampbell avatar Jul 16 '20 19:07 marccampbell

@marccampbell Hi Marc, the goal here would be to get the information stored in the kubelet.log file using the client, and parse it into a json kind of file, is that right?

manavellamnimble avatar Aug 24 '20 21:08 manavellamnimble

It doesn't need to be parsed into a JSON file, it would best included as-is, if possible.

marccampbell avatar Aug 24 '20 21:08 marccampbell

Morning!! Regarding this issue, I was suggested it would be a good idea to deploy a daemonset such as fluentd to stream kubelet logs from the node. It could be done deploying a fluentd container in the cluster to get the logs, and then deleting it. A call through the client would be cleaner though, but I was not yet able to find a way to get the logs using the client. Any idea/suggestion would be very welcome. @divolgin @emosbaugh @laverya

manavellamnimble avatar Aug 26 '20 15:08 manavellamnimble

With the addition of host collectors, the spec we provide as an example does include this:

It's not a specific collector for logs where we could supply a list of services to collect logs for, but it does provide the info. Pending a better overall logging and observability feature which encompasses wider needs, I think we can close this issue now.

    - run:
        collectorName: "journalctl-kubelet"
        command: "journalctl"
        args: ["-u", "kubelet", "--no-pager", "-S", "7 days ago"]

xavpaice avatar Oct 09 '22 22:10 xavpaice