简体   繁体   English

单个 GKE Kubernetes 节点集群

[英]single GKE kubernetes node cluster

When i did :当我这样做时:

Kubectl top node

在此处输入图片说明

Cluster single node size : 4 vCPU & 16 GB Memory集群单节点大小:4 vCPU & 16 GB 内存

in Kubernetes cluster operation logs found :在 Kubernetes 集群操作日志中发现:

在此处输入图片说明

But CPU usage is 24% as showing in command output the from why am i getting this error.但是 CPU 使用率为 24%,如命令输出中所示,我为什么会收到此错误。

在此处输入图片说明

above graphs showing node usage 1.5 vCPU max.上图显示了节点使用情况,最大 1.5 vCPU。

Also some of my pods continuous increasing memory and after around 24 hour time reach to memory limit and auto restart due to resource limit set.此外,我的一些 pod 不断增加内存,并在大约 24 小时后达到内存限制并由于设置了资源限制而自动重启。 在此处输入图片说明

Question :题 :

If kubectl showing CPU usage 24% but why I am getting error in logs insufficient CPU ?如果 kubectl 显示 CPU 使用率 24% 但为什么我在日志中收到错误 CPU 不足?

The error message you have is because there are no nodes in your cluster with enough allocatable CPU to meet the needs of the cpu request of your pod您的错误信息是因为您的集群中没有节点具有足够的可分配 CPU 来满足您 pod 的 cpu 请求的需求

The k8s scheduler looks at the allocatable cpu of a node minus the total cpu requested to determine if there is sufficient cpu a available to add a new pod. k8s 调度程序查看节点的可分配 cpu 减去请求的总 cpu,以确定是否有足够的 cpu a 可用于添加新 pod。

Note that the allocatable or requested cpu has nothing to do with the actual amount of cpu being used on a node.请注意,可分配或请求的 cpu 与节点上使用的实际 cpu 数量无关。 The scheduler does not look at the actual node cpu usage, this is why setting accurate resource requests is important.调度器不会查看实际的节点 cpu 使用情况,这就是设置准确的资源请求很重要的原因。 Of your container only uses 50m cpu, don't have a request set to 200m otherwise you'll have a lot of wasted resources.您的容器仅使用 50m cpu,不要将请求设置为 200m,否则您将浪费大量资源。

Based on the info you've provided, your cou requests are likely too high根据您提供的信息,您的 cou 请求可能过高

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

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