Sorry, I am a rookie new to k8s.
I am testing the 1.22.1 version of k8s (systemd as cgroup driver).
I have some problems that have bothered me for days.
Q:
- Is there an estimation formula for resource reservation ?
I read this article carefully:
https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/。
But for example parameters :
–kube-reserved、–system-reserved 。
It is difficult for me to know how to set the correct parameters, are there some best practices for reference?
- how to create the slice under systemd ?
And then I read this article carefully:
Now default slice tree is (not set --kube-reserved、–system-reserved ):
/sys/fs/cgroup/systemd/system.slice/kubelet.service
├── cgroup.clone_children
├── cgroup.procs
├── notify_on_release
└── tasks
It looks like kubelet.slice is already under system.slice ,But in the previous github link , The suggested structure is like this:
/ (Cgroup Root)
.
+..systemreserved or system.slice (Specified via `--system-reserved-cgroup`; `SystemReserved` enforced here *optionally* by kubelet)
. . .tasks(sshd,udev,etc)
.
.
+..podruntime or podruntime.slice (Specified via `--kube-reserved-cgroup`; `KubeReserved` enforced here *optionally* by kubelet)
. .
. +..kubelet
. . .tasks(kubelet)
. .
. +..runtime
. .tasks(docker-engine, containerd)
.
.
+..kubepods or kubepods.slice (Node Allocatable enforced here by Kubelet)
How can I change the current cluster to achieve the suggested cgroup structure ?
If you can provide any information, I would be very grateful.
Thx!