Where are Kubernetes Quartet 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 one).

I looked in /var/logs but I could not find such a file. Where could it be?

+27
source share
4 answers

If you run kubelet using systemd , you can use the following method to view kubelet logs:

 # journalctl -u kubelet 
+59
source

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

+4
source

Finally, I was able to find it in the / var / log / upstart directory. The kubernetes on my machine starts upstart. That's why these log files are in the upstart directory

+3
source

It depends on how it was installed. I installed Kubernetes on some Ubuntu computers following the instructions of Docker-MultiNode.

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

  1. Find your container ID.

     $ docker ps | egrep kubelet 
  2. Use this container identifier to view logs.

     $ docker logs '<container-id>' 
+2
source

All Articles