如何限制EKS fargate实例的内存大小



我试图限制我的吊舱的内存

resources:
requests:
cpu: 2000m
memory: 100Mi
limits:
cpu: 2000m
memory: 140Mi

然而,如果我使用kubectl describe nodes,我仍然会被分配一个2vCPU、16G内存节点。

看起来内存值无效。来自AWS文档Fargate rounds up to the compute configuration shown below that most closely matches the sum of vCPU and memory requests in order to ensure pods always have the resources that they need to run.(此处参考(

您正在定义一个具有140兆字节内存的2 vCPU,这远远低于该级别CPU的最低4GB(4G=3817Mi,您可以在此处运行转换(

我个人认为,通过阅读AWS的配置,可以设置一个带有2个vCPU和4GB RAM的pod。但也许140Mi被认为是无效的,它被四舍五入到该范围的最大值。

也许你的意思是14000Mi(那么14.6 GB(的RAM?

kubectl describe nodes的输出在这种情况下并不重要。

AWS设置一个注释";CapacityProvisioned";到描述所用实例大小的pod。注释显示在UI控制台中的集群下,Workloads,然后是右下角的Pods。

使用的节点可能比请求的大,但是,您仍然受限于请求的资源。

来源:https://github.com/aws/containers-roadmap/issues/942#issuecomment-747416514

最新更新