尽管我的分配更高,但Google Container正在限制CPU分配的资源 [英] Google Container is limiting the resource of CPU allocation despite my higher allocation

查看:109
本文介绍了尽管我的分配更高,但Google Container正在限制CPU分配的资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

"spec": {
  "containers": [
    {
      "name": "test",
      "image": "gcr.io/helloworldnodejs-1119/mytetest",
      "resources": {
        "requests": {
          "cpu": "500m",
          "memory": "128Mi"
        }
      },
      "env": [
        {
          "name": "GET_HOSTS_FROM",
          "value": "dns"
        }
      ],
      "ports": [
        {
          "name": "middleware-server",
          "containerPort": 8000,
          "hostPort": 8000
        }
      ]
    }
  ]
}


RajRajen:mytetest rajrajen$ kubectl describe pod lbmiddleware-6e1hi 
Name: lbmiddleware-6e1hi 
Namespace: default Image(s): gcr.io/helloworldnodejs-1119/mytetest 
Node: / Labels: app=mymiddleware,tier=mymiddleware 
**Status: Pending** 
Reason:
Message:
IP:
Replication Controllers: mymiddleware (1/1 replicas created) Containers: lb4btest: Image: gcr.io/helloworldnodejs-1119/mytetest

**Limits:
  cpu:        100m**

***State:      Waiting***
Ready:      False
Restart Count:  0
Events: 
FirstSeen LastSeen Count From SubobjectPath Reason Message 
Thu, 12 Nov 2015 11:05:01 -0800 Thu, 12 Nov 2015 11:05:16 -0800 5 {scheduler } ***failedScheduling Failed for reason PodFitsResources and possibly others***

看起来我的Docker大小是130MB,甚至在POD中配置了500MB(GKE容器创建)之后.然而,执行程序设置了Limits:cpu:100m ..

It looks my Docker size is 130MB and even after provisioning 500MB in the POD ( GKE - container creation ) . Yet the execution sets up the Limits : cpu : 100m ..

https://cloud.google.com/container-engine/docs/教程/访客留言簿 我正在使用middleware-controller.json而不是.YAML文件来创建GKE-Google容器引擎.

https://cloud.google.com/container-engine/docs/tutorials/guestbook instead of .YAML file, I am using middleware-controller.json to create GKE - Google Container engine.

RajRajen:lb4btest rajrajen$ kubectl create -f middleware-controller.json
replicationcontrollers/lbmiddleware

先前使用的命令: gcloud container clusters create lb4b-test-cluster --num-nodes 1 --machine-type g1-small

这是Docker在Google Cloud注册表中推送的最终结果

This my final result of the Docker push in Google Cloud registry

latest: digest: sha256:3c73d0c25e65c39164258c384b34d2cab72303375c8d3f6a2e70930000b9e171 **size: 132946**

推荐答案

您创建了一个具有相对较小机器类型的1节点群集.默认情况下,Google Container Engine运行群集加载项(记录和监控),这些加载项占用了群集中的某些资源(可以根据需要禁用这些资源).集群中似乎没有足够的剩余空间来启动需要这么多资源的Pod.创建集群或设置较大(或更多)节点时,请尝试禁用集群附加组件.

You created a 1 node cluster with a relatively small machine type. By default, Google Container Engine runs cluster add-ons (logging & monitoring) that take up some of the resources in your cluster (you can disable these if you wish). It looks like you don't have enough remaining space in your cluster to launch a pod that requires this many resources. Try disabling the cluster add ons when you create the cluster or provisioning larger (or more) nodes.

这篇关于尽管我的分配更高,但Google Container正在限制CPU分配的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆