Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the Kubernetes kubelet logs located?

Tags:

kubernetes

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 have looked in /var/logs but I couldn't find a such file. Where could that be?

like image 667
Dimuthu Avatar asked Dec 06 '15 02:12

Dimuthu


People also ask

Where can I find Kubelet logs?

If you are trying to go directly to the file you can find the kubelet logs in /var/log/syslog directory.

How do I get Kubernetes service log?

To do this, you'll have to look at kubelet log. Accessing the logs depends on your Node OS. On some OSes it is a file, such as /var/log/kubelet. log, while other OSes use journalctl to access logs.

Where can I find Kubernetes job logs?

On OpenShift or other certified Kubernetes platform, look up the web console of your Kubernetes cluster, such as, for example, the OpenShift dashboard. On IBM Cloud Private, look up the IBM Cloud Private web console. In either case, you can also run the logs command.


2 Answers

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

# journalctl -u kubelet 
like image 102
flyer Avatar answered Oct 21 '22 07:10

flyer


If you are trying to go directly to the file you can find the kubelet logs in /var/log/syslog directory. This is for ubuntu 16.04 and above.

like image 35
Jonathan_M Avatar answered Oct 21 '22 06:10

Jonathan_M