Where are the Kubernetes kubelet logs located?


Where are the Kubernetes kubelet logs located?



I installed Kubernetes on my Ubuntu machine. For some debugging purposes I need to look at the kubelet log file (if there is any such file). I looked at /vat/logs but I couldn't find a such file. Where could that be?




3 Answers
3



If you run kubelet using systemd, then you could use the following method to see kubelet's logs:


systemd


# journalctl -u kubelet





This is the case for Amazon EKS - just found kubelet logs thanks to this comment
– lexsys
Jun 26 at 10:10



Finally I could find it in /var/log/upstart directory. Kubernetes in my machine is started using upstart. That's why those log files are in upstart directory



It depends how it was installed. I installed Kubernetes on some Ubuntu machines following the Docker-MultiNode instructions at http://kubernetes.io/v1.1/docs/getting-started-guides/docker-multinode.html.



With this install, I find the logs using the logs command like this.



Find your container ID.



$ docker ps | egrep kubelet



Use that container ID to view the logs



$ docker logs <container-id>


<container-id>





I installed Kubernetes by running kube-up.sh script in cluster directory and I have a single node running as both master and minion
– Dimuthu
Jan 23 '16 at 0:58





why was this down-voted?
– Rachel
Oct 26 '16 at 12:42





The kubelet is normally a process in the host, not a pod.
– Sofia
Jun 1 at 7:12






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to make file upload 'Required' in Contact Form 7?

Rothschild family

amazon EC2 - How to make wp-config.php to writable?