简体   繁体   English

kubernetes节点显示限制,但没有设置限制

[英]kubernetes node shows limit, but no limit set

i have not configured any rangelimit or pod limit but my nodes show requests and limits, is that a limit? 我没有配置任何rangelimit或pod限制,但我的节点显示请求和限制,这是一个限制? or the max-seen value? 或最大值?

having around 20 active nodes all of them are the same hardware size - but each node shows diffrent limit with kubctl describe node nodeXX 有大约20个活动节点,它们都是相同的硬件大小 - 但每个节点显示不同的限制与kubctl describe node nodeXX

does that mean i cannot use more than the limit? 这是否意味着我不能使用超过限制?

用法

CLI

If you check the result of kubectl describe node nodeXX again more carefully you can see that each pod has the columns: CPU Requests , CPU Limits , Memory Requests and Memory Limits . 如果再次仔细检查kubectl describe node nodeXX的结果,您可以看到每个pod都有以下列: CPU请求CPU限制内存请求内存限制 The total Requests and Limits as shown in your screenshot should be the sum of your pods requests and limits. 屏幕截图中显示的总请求数限制数应为您的广告连播请求和限制的总和。
If you haven't configured limits for your pods then they will have 0%. 如果您尚未为pod配置限制,则它们将为0%。 However I can see in your screenshot that you have a node-exporter pod on your node. 但是,我可以在屏幕截图中看到您的节点上有节点导出器窗格。 You probably also have pods in the kube-system namespace that you haven't scheduled yourself but are essential for kubernetes to work. 你可能还有kube-system命名空间中的pod,你没有自己安排但是kubernetes工作必不可少。

About your question: 关于你的问题:

does that mean i cannot use more than the limit 这是否意味着我不能使用超过限制

This article is great at explaining about requests and limits: 本文非常擅长解释请求和限制:

Requests are what the container is guaranteed to get. 请求是容器保证得到的。 If a container requests a resource, Kubernetes will only schedule it on a node that can give it that resource. 如果容器请求资源,Kubernetes将仅在可以为其提供该资源的节点上安排它。

Limits, on the other hand, make sure a container never goes above a certain value. 另一方面,限制确保容器永远不会超过某个值。 The container is only allowed to go up to the limit, and then it is restricted. 容器只允许达到极限,然后受到限制。

For example: if your pod requests 1000Mi of memory and your node only has 500Mi of requested memory left, the pod will never be scheduled. 例如:如果您的pod请求1000Mi内存且您的节点仅剩下500Mi的请求内存,则永远不会安排该pod。 If your pod requests 300Mi and has a limit of 1000Mi it will be scheduled, and kubernetes will try to not allocate more than 1000Mi of memory to it. 如果你的pod请求300Mi并且限制为1000Mi,它将被安排,并且kubernetes将尝试不为它分配超过1000Mi的内存。

It may be OK to surpass 100% limit, specially in development environments, where we trade performance for capacity. 可能超过100%的限制,特别是在我们交易容量的性能的开发环境中。 Example: 例:

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM