5

I want to set higher logging verbosity in my k8s setup. While i managed to enable verbosity for API server and Kubectl by --v=4 argument; I am having difficulties finding way to pass in this flag to Kubelet.

I am using kubeadm init method to launch small scale cluster, where master is also tainted so it can serve as minion. can you help in in enabling kubelet logging verbosity ?

ankit patel
  • 1,399
  • 5
  • 17
  • 29

1 Answers1

8

1) ssh to the master node

2) append /var/lib/kubelet/kubeadm-flags.env file with --v=4, i.e.

KUBELET_KUBEADM_ARGS=--cgroup-driver=cgroupfs --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.1 --v=4

3) restart kubelet service

sudo systemctl restart kubelet
A_Suh
  • 3,727
  • 6
  • 22
  • thank you for your response @A_suh ; I am attempting logging level 9 to get details on all http requests from kubelet . I have started doing exactly same steps after https://stackoverflow.com/questions/52416671/kubelet-configuration last night. I still have a huge log to go thorugh and i will report in a day if it worked or not. – ankit patel Apr 18 '19 at 15:34
  • yes these steps enable kubelet logging to desired level – ankit patel Apr 23 '19 at 04:39