[英]How to limit allocatable memory per node on Kubernetes?
I would like to limit allocatable memory per node (VM) on Kubernetes.我想限制 Kubernetes 上每个节点 (VM) 的可分配内存。
Now it seems that certain pods can grow over the memory limit of VM making it unresponsive instead of killing pods before that happens.现在似乎某些 pod 可以增长超过 VM 的内存限制,使其无响应,而不是在此之前杀死 pod。
See Reserve Compute Resources for System Daemons .请参阅为系统守护程序保留计算资源。
In the systemd, we can configure kubelet with Node Allocatable feature like this.在 systemd 中,我们可以像这样使用 Node Allocatable 功能配置 kubelet。
$ cat > /etc/systemd/system/kubelet.service.d/20-node-eviction.conf <<EOF
Environment="KUBELET_EXTRA_ARGS=--eviction-hard=memory.available<500Mi --system-reserved=memory=1Gi"
EOF
$ systemctl daemon-reload
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.