troubleshoot
troubleshoot copied to clipboard
Can cluster resources or cluster info collector include kubelet logs from each node
@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?
It doesn't need to be parsed into a JSON file, it would best included as-is, if possible.
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
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"]