i have few question for kubelet-reserved-resoure. i don't know my configuration is actually working or not.
step1: i'm create cgroup dir by using follow command
for i in `ls -L /sys/fs/cgroup`; do mkdir -p /sys/fs/cgroup/$i/kube-reserved.slice; done
for i in `ls -L /sys/fs/cgroup`; do mkdir -p /sys/fs/cgroup/$i/system-reserved.slice; done
step2: additional the kubelet args like this:
--enforce-node-allocatable=pods,kube-reserved,system-reserved \
--kube-reserved=cpu=1,memory=1Gi \
--kube-reserved-cgroup=/kube-reserved.slice \
--system-reserved=cpu=1,memory=1Gi \
--system-reserved-cgroup=/system-reserved.slice \
--cgroup-root=/ --v=4
after kubelet started. i can see the node Allocatable is changed as i expected.
Capacity:
cpu: 8
ephemeral-storage: 9480420Ki
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 16414252Ki
pods: 110
Allocatable:
cpu: 6
ephemeral-storage: 8737155058
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 14214700Ki
pods: 110
Kubelet logs for system-reserved.slice
:
root@k8s-node02:~# journalctl -xeu kubelet |grep -v ignoring |grep system-reserved.slice
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.712207 7117 factory.go:177] Factory "docker" was unable to handle container "/system-reserved.slice"
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.712214 7117 factory.go:166] Error trying to work out if we can handle /system-reserved.slice: /system-reserved.slice not handled by systemd handler
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.712218 7117 factory.go:177] Factory "systemd" was unable to handle container "/system-reserved.slice"
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.712225 7117 factory.go:177] Factory "containerd" was unable to handle container "/system-reserved.slice"
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.715222 7117 factory.go:177] Factory "docker" was unable to handle container "/system-reserved.slice"
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.715229 7117 factory.go:166] Error trying to work out if we can handle /system-reserved.slice: /system-reserved.slice not handled by systemd handler
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.715232 7117 factory.go:177] Factory "systemd" was unable to handle container "/system-reserved.slice"
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.715238 7117 factory.go:177] Factory "containerd" was unable to handle container "/system-reserved.slice"
Kubelet logs for kube-reserved.slice
:
root@k8s-node02:~# journalctl -xeu kubelet |grep -v ignoring |grep kube-reserved.slice
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.711765 7117 factory.go:177] Factory "docker" was unable to handle container "/kube-reserved.slice"
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.711772 7117 factory.go:166] Error trying to work out if we can handle /kube-reserved.slice: /kube-reserved.slice not handled by systemd handler
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.711776 7117 factory.go:177] Factory "systemd" was unable to handle container "/kube-reserved.slice"
Jan 20 11:23:46 k8s-node02 kubelet[7117]: I0120 11:23:46.711783 7117 factory.go:177] Factory "containerd" was unable to handle container "/kube-reserved.slice"
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.713871 7117 factory.go:177] Factory "docker" was unable to handle container "/kube-reserved.slice"
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.713877 7117 factory.go:166] Error trying to work out if we can handle /kube-reserved.slice: /kube-reserved.slice not handled by systemd handler
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.713880 7117 factory.go:177] Factory "systemd" was unable to handle container "/kube-reserved.slice"
Jan 20 11:24:46 k8s-node02 kubelet[7117]: I0120 11:24:46.713886 7117 factory.go:177] Factory "containerd" was unable to handle container "/kube-reserved.slice"
this normal for setting resource-reserved? or my configuration is wrong?