Does cgroup system.slice/k3s.service reflect the resource usage of the k3s service itself? #11470
Unanswered
codeReaper2001
asked this question in
Q&A
Replies: 1 comment
-
(1) This code is pretty dense, but you can see here how we internally launch containerd. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,I am currently considering making a monitoring dashboard for k3s-server/k3s-agent resource usage, but now I have some doubts.
I noticed that k3s is hosted to run in systemd and kubelet (including cadvisor) is integrated into the k3s binary, kubelet startup parameters are also generated during the k3s initialization phase and then passed to the kubelet program, in the code I found this part of the code:
k3s/pkg/daemons/agent/agent_linux.go
Lines 150 to 163 in b55aaeb
This should be why I was able to get the cadvisor metrics with the id k3s.service
In addition, I found that the resource usage test of the k3s official website also uses the corresponding indicators here
However, when I used the systemd-cgls command to view the cgroup details of k3s, I found many child processes, including containerd. I want to know:
(1) When were these child processes added to the k3s cgroup? I did not find the relevant code yet
(2) Can the container_xxx metrics above accurately describe the resource usage of k3s-server/k3s-agent?
Beta Was this translation helpful? Give feedback.
All reactions