mirror of
https://github.com/CoderSherlock/CoderSherlock.github.io.git
synced 2026-06-12 23:58:11 -07:00
3.5 KiB
3.5 KiB
title, date, tags, author, cover
| title | date | tags | author | cover | |||
|---|---|---|---|---|---|---|---|
| Debug Kubelet | 2024-04-10 03:34:00 -0400 |
|
Pengzhan Hao | /static/2024-04/kubelet.png |
Debug logs
Like all others program's debugging, the most straightforward way for newbies and the easiest way for advanced developer is relying on logs. Same to debug kubelet, bumping up verbosity to show more logs is the most intuitive approach when facing an issue. Like most component in Kubernetes, kubelet uses klog for logging and there are 10 verbosity levels(0-9).
TL;DR: Bumping up to level 5 would satisfy most debugging needs.
By the time, this note was written. In kubelet related code, level 8 was only used in pkg/kubelet/prober/prober_manager.go and level 7 was only used in pkg/kubelet/logs/container_log_manager.go. And there are 11 occurrences that level 6 was used, and all of them are not part of workload lifecycle related.