Setting kubelet log level prevents the service to start
Closed this issue · 2 comments
Summary
There is a malfunction in my microk8s deployment and I'd like to set the logging verbosity because the current logs are not descriptive enough. I found that each service has it's own configuration file typically under /var/snap/microk8s/current/args. Some services like containerd allows me to change the log level, although kubelet does not. In case I add --v=4 to /var/snap/microk8s/current/args/kubelet and restart microk8s, I can see in the journal logs that kubelet fails to start due to logging level set once and should not be changed later.
There's no clear documentation on how to set these logging levels apart from configuring kubelet directly which turns out not to be working with microk8s.
The version I'm current using is MicroK8s v1.28.13 revision 7207 and I'd like to avoid upgrading the cluster.
Reproduction Steps
Insert --v=4 into kubelet config and restart microk8s.
Hi @mikeolasz,
As all of the services are consolidated to a single binary (kubelite) you will have to set the log level to be the same on all of the k8s services. This means you need to add --v=4 to /var/snap/microk8s/current/args/kubelet, /var/snap/microk8s/current/args/kube-apiserver, /var/snap/microk8s/current/args/kube-proxy, /var/snap/microk8s/current/args/kube-controller-manager, /var/snap/microk8s/current/args/kube-scheduler.
Thank you for the quick response!
Is this documented anywhere and I just missed to spot it?