I am trying to find the k8s systems log files on each node in our clusters in order to ship them to elasticsearch via fluentd. My understanding is that they should be located in '/var/log' on each node
so you would have on the master nodes
/var/log/kube-apiserver.log
/var/log/kube-scheduler.log
/var/log/kube-controller-manager.log
and on the worker nodes
/var/log/kubelet.log
/var/log/kube-proxy.log
The problem is I don't see any of these files on any of our nodes on either of our clusters (both built with kubespray running 1.11.9). I have even checked on miniukube & I don't see them there either.
I can see the docker logs in '/var/log/containers' but from everythiung I have read I was expecting the logs to be in '/var/log'
What am I missing here?
For kubernetes1.6+, you need to use following flags
kube-apiserver
--audit-log-path=/var/log/kubernetes/kube-apiserver.log --logtostderr=false
kube-controller-manager
--log-dir=/var/log/kubernetes --logtostderr=false
kube-scheduler
--log-dir=/var/log/kubernetes --logtostderr=false
kubelet
--log-dir=/var/log/kubernetes --logtostderr=false
kube-proxy
--log-dir=/var/log/kubernetes --logtostderr=false
Also you need to restart each service after updating config