Question regarding kubelet cgroup driver and systemd slice configuration

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: 1.29.9
Cloud being used: bare-metal
Installation method: kubeadm
Host OS: ubunto 22.04
CNI and version: calico
CRI and version: v1.6.36

I am currently responsible for cluster operations. We recently encountered a kubelet OOM-Kill issue, so I configured kube-reserved and system-reserved referencing the official guide below:

https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#kube-reserved

However, I confirmed that kubelet and containerd are still running under system.slice.

Based on my understanding, simply configuring the .slice related flags in Kubernetes only creates the cgroup slice itself. I believe that for the processes to actually run within the slice specified in kubeReservedCgroup, I need to explicitly configure systemd as follows:

YAML

# sudo systemctl edit kubelet
[Service]
Slice=runtime.slice

Is manually modifying the systemd service file (as shown above) the correct method to change the slice for kubelet and cgroups? Or is it considered best practice to handle this via kubeadm configuration or kubelet arguments/flags instead?