Kubelet
How to Upgrade the cgroup Version of a Kubernetes Node
· β˜• 3 min read
1. Interface Path Differences Between cgroup v1 and v2 v1 1 2 3 4 /sys/fs/cgroup/cpu/cpu.cfs_quota_us /sys/fs/cgroup/cpu/cpuacct.usage /sys/fs/cgroup/memory/memory.limit_in_bytes /sys/fs/cgroup/memory/memory.usage_in_bytes v2 1 2 3 4 /sys/fs/cgroup/cpu.max /sys/fs/cgroup/cpu.stat /sys/fs/cgroup/memory.max /sys/fs/cgroup/memory.current cgroup v2 is the upgraded version of v1, with advantages such as more unified resource hierarchy management and precise resource isolation. But it also means that when writing code, the paths for reading the relevant interface files are different, so compatibility handling is required.

How to Change Kubelet Startup Parameters
· β˜• 1 min read
1. Edit the Kubelet Configuration File 1 vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf Modify the relevant Kubelet parameters ExecStart=/usr/local/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS You can list the available parameters with the following command: 1 kubelet --help For example, if you need to change --sync-frequency in KUBELET_KUBECONFIG_ARGS, the period for syncing container configuration, the default value is 1 min.