应该允许每个节点启动30个Pod

时间:2018-07-14 12:42:33

标签: kubernetes

使用以下命令在本地集群kubernetes上运行e2e测试:

<style type="text/css" media="print">
  @page {
    size: auto;  
    margin: 0;  
  }
</style>
//now set manual padding to body
<style>
  body{
    padding-left: 1.3cm;
    padding-right: 1.3cm; 
    padding-top: 1.1cm;
  }
</style>

显示错误:

go run hack/e2e.go -- --provider=local --test --check-version-skew=false --test_args="--host=https://192.168.1.5:6443 --ginkgo.focus=\[Feature:Performance\]"

貌似,本地集群Kubernetes具有每个节点Pod的限制。如何解决这个问题?本地群集配置为:

[Feature:Performance] should allow starting 30 pods per node using { ReplicationController} with 0 secrets, 0 configmaps and 0 daemons [BeforeEach]
• Failure in Spec Setup (BeforeEach) [6.331 seconds]
[sig-scalability] Density
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/scalability/framework.go:22
  [Feature:Performance] should allow starting 30 pods per node using { ReplicationController} with 0 secrets, 0 configmaps and 0 daemons [BeforeEach]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/scalability/density.go:554

  Expected error:
      <*errors.errorString | 0xc421733010>: {
          s: "Namespace e2e-tests-containers-ssgmn is active",
      }
      Namespace e2e-tests-containers-ssgmn is active
  not to have occurred

  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/scalability/density.go:466
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSJul 14 00:02:24.065: INFO: Running AfterSuite actions on all node
Jul 14 00:02:24.065: INFO: Running AfterSuite actions on node 1


Summarizing 2 Failures:

[Fail] [sig-scalability] Load capacity [BeforeEach] [Feature:Performance] should be able to handle 30 pods per node { ReplicationController} with 0 secrets, 0 configmaps and 0 daemons
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/scalability/load.go:156

[Fail] [sig-scalability] Density [BeforeEach] [Feature:Performance] should allow starting 30 pods per node using { ReplicationController} with 0 secrets, 0 configmaps and 0 daemons
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/scalability/density.go:466

Ran 2 of 998 Specs in 12.682 seconds
FAIL! -- 0 Passed | 2 Failed | 0 Pending | 996 Skipped --- FAIL: TestE2E (12.71s)

1 个答案:

答案 0 :(得分:1)

根据kubelet documentation

--max-pods int32
Number of Pods that can run on this Kubelet. (default 110)

因此,110应该足以通过测试。但是测试可能会根据Allocatable.CPU and Allocatable.Memory

来衡量节点的实际容量

此外,在测试运行之前,所有名称空间都应为deleted

// Terminating a namespace (deleting the remaining objects from it - which
// generally means events) can affect the current run. Thus we wait for all
// terminating namespace to be finally deleted before starting this test.

您的名称空间之一似乎仍处于活动状态,因此测试失败。

相关问题