我们已经创建了一个GKE集群,并将其设置为区域A和B中的europe-west2。集群设置为:
节点数:1个(总共2个)自动缩放:可以(每个区域1-4个节点)
我们正在尝试测试自动伸缩,但集群无法调度任何pods,并且没有添加任何额外的节点。
W 2019-11-11T14:03:17Z unable to get metrics for resource cpu: no metrics returned from resource metrics API
W 2019-11-11T14:03:20Z unable to get metrics for resource cpu: no metrics returned from resource metrics API
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:04:42Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:44Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:45Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:45Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:45Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:45Z 0/4 nodes are available: 4 Insufficient cpu.
W 2019-11-11T14:04:51Z unable to get metrics for resource cpu: no metrics returned from resource metrics API
I 2019-11-11T14:04:53Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:05:03Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:05:03Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:05:03Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T14:05:03Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
我们有大约80%的pod是不可调度的,并且显示为处于错误状态。但我们从未看到集群大小增加(既不是物理的,也不是水平的)。
我们从2个节点的设置开始,并进行了负载测试以使其达到最大。CPU在两个节点上都达到100%,RAM在两个节点上都达到95%。我们收到以下错误消息:
I 2019-11-11T16:01:21Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T16:01:21Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T16:01:21Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
I 2019-11-11T16:01:21Z Ensuring load balancer
W 2019-11-11T16:01:24Z Error creating load balancer (will retry): failed to ensure load balancer for service istio-system/istio-ingressgateway: failed to ensure a static IP for load balancer (a72c616b7f5cf11e9b4694201ac10480(istio-system/istio-ingressgateway)): error getting static IP address: googleapi: Error 404: The resource 'projects/gc-lotto-stage/regions/europe-west2/addresses/a72c616b7f5cf11e9b4694201ac10480' was not found, notFound
W 2019-11-11T16:01:25Z missing request for cpu
W 2019-11-11T16:01:25Z missing request for cpu
W 2019-11-11T16:01:26Z missing request for cpu
I 2019-11-11T16:01:31Z pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 max cluster cpu, memory limit reached
W 2019-11-11T16:01:35Z missing request for cpu
W 2019-11-11T16:01:44Z 0/2 nodes are available: 2 Insufficient cpu.
W 2019-11-11T16:01:44Z 0/2 nodes are available: 2 Insufficient cpu.
发布于 2020-01-22 14:07:42
它还取决于配置的节点大小:
首先查看节点可分配资源:
Kubectl describe node <node>
Allocatable:
cpu: 4
ephemeral-storage: 17784772Ki
hugepages-2Mi: 0
memory: 4034816Ki
pods: 110
还要检查已分配的资源:
Allocated resources:
Kubectl describe node <node>
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 1505m (37%) 3 (75%)
memory 2750Mi (69%) 6484Mi (164%)
ephemeral-storage 0 (0%) 0 (0%)
然后查看资源请求:
如果CPU请求/内存请求多于节点可分配资源,则节点可能不会自动缩放。节点具有足够的容量来满足pod请求。
理想情况下,可分配的资源少于实际容量,因为系统会将部分容量分配给系统守护进程。
发布于 2020-01-22 12:31:24
有一段时间我遇到了同样的问题,经过大量的研究和试验发现,如果你想在GKE中实现集群自动伸缩,你必须牢记一些事情。
这对我来说很管用。
希望能有所帮助。
https://stackoverflow.com/questions/58803781
复制相似问题