admin管理员组文章数量:1357121
I want the defalut container(contained) in the k8s pod to use the parameter cpu-rt-runtime, so I modified the following part of the k8s code to test it
staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto
addint64 cpu_rt_runtime = 11
at the end ofLinuxContainerResources
,then I rebuild api.pb.gopkg/kubelet/kuberuntime/kuberuntime_container_linux.go
addresources.CpuRtRuntime = 5000
beforereturn &resources
infunc (m *kubeGenericRuntimeManager) calculateLinuxResources
then i create cluster using kind and build a debian pod with kubectl run -it --rm debian-shell --image=debian:latest --restart=Never -- bash
, all success, but after i entered conatiner i found that
cat /sys/fs/cgroup/cpu,cpuacct/cpu.rt_runtime_us
return 0
May I ask if my changes are correct?
i am using kernel v5.8(CONFIG_RT_GROUP_SCHED=y), Ubuntu20.04, k8s v1.32.3, kind v0.27.0 docker 28.0.2
i followed and command
docker run -it \
--cpu-rt-runtime=950000 \
--ulimit rtprio=99 \
--cap-add=sys_nice \
debian:jessie
works well in my system
本文标签: kindhow to enable cpurtruntime in kubernetesStack Overflow
版权声明:本文标题:kind - how to enable cpu_rt_runtime in kubernetes - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744034495a2579515.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论