简体   繁体   English

如何限制 Kubernetes 上每个节点的可分配内存?

[英]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.

相关问题 如何限制每个节点具有附加托管磁盘的Pod的数量 - How to limit amount of pods with attached managed disks per node 创建 Azure Kubernetes 入口控制器以限制每个 Pod 1 个连接 - Create Azure Kubernetes ingress controller to limit 1 connection per pod Azure Kubernetes - 每个节点仅实施一个部署? - Azure Kubernetes - Enforce only one deployment per node? Azure:已准备的语句超出了每个会话20 MB的内存限制 - Azure: Exceeded the memory limit of 20 MB per session for prepared statements 对于Cosmos Db,每个数据库,每个帐户或每个订阅是否有任何限制(多少)集合? - Is there any limit (how many) of collections per database, per account or per subscription for Cosmos Db? 如何限制Edge设备上edgeAgent的内存 - how to limit memory for edgeAgent on an Edge device pandas to_sql() 错误 - 对于准备好的语句,超出了 memory 20 MB 的限制(每个 session) - pandas to_sql() error - Exceeded the memory limit of 20 MB per session for prepared statements Is the 1.5 GB memory limit in Azure Functions limited to the entire Function App or per function invocation? - Is the 1.5 GB memory limit in Azure Functions limited to the entire Function App or per function invocation? 如何在 microsoft face api 中增加每秒事务限制? - How to increase transaction per second limit in microsoft face api? 如何限制每个用户/ip/mac/etc 的 Azure 函数调用? - How to limit Azure Functions Calls per user/ip/mac/etc?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM