how to enable kubelet logging verbosity

4/18/2019

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
kubelet
kubernetes

1 Answer

4/18/2019

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
Source: StackOverflow