我在Ubuntu上有一个本地kueretes设置。我正在尝试在此群集上执行e2e测试。以下是我得到的结果:
root@kube-master:~/kube_latest/kubernetes# ./_output/local/go/bin/e2e.test --host="127.0.0.1:8080" --provider="local" --ginkgo.v=true --ginkgo.dryRun=true --kubecong="$HOME/.kubernetes_auth"
Feb 1 14:19:28.839: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth
Feb 1 14:19:28.839: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth
Feb 1 14:19:28.839: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
Feb 1 14:19:28.845: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb 1 14:19:28.845: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (0 seconds elapsed)
Feb 1 14:19:28.845: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 1 14:19:28.845: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 1 14:19:28.845: INFO: kube-dns-v8-m8drm 192.168.122.129 Pending [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 1 14:19:28.845: INFO:
Feb 1 14:19:30.854: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb 1 14:19:30.855: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (2 seconds elapsed)
Feb 1 14:19:30.856: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 1 14:19:30.857: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 1 14:19:30.857: INFO: kube-dns-v8-m8drm 192.168.122.129 Pending [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 1 14:19:30.858: INFO:
Feb 1 14:19:32.854: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb 1 14:19:32.854: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (4 seconds elapsed)
Feb 1 14:19:32.854: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 1 14:19:32.854: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 1 14:19:32.854: INFO: kube-dns-v8-m8drm 192.168.122.129 Pending [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 1 14:19:32.854: INFO:
Feb 1 14:19:34.851: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb 1 14:19:34.851: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (6 seconds elapsed)
Feb 1 14:19:34.851: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 1 14:19:34.851: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 1 14:19:34.851: INFO: kube-dns-v8-m8drm 192.168.122.129 Pending [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 1 14:19:34.851: INFO:
Feb 1 14:19:36.852: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb 1 14:19:36.852: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (8 seconds elapsed)
Feb 1 14:19:36.852: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 1 14:19:36.852: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 1 14:19:36.852: INFO: kube-dns-v8-m8drm 192.168.122.129 Pending [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 1 14:19:36.852: INFO:
Feb 1 14:19:38.851: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb 1 14:19:38.852: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (10 seconds elapsed)
Feb 1 14:19:38.852: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 1 14:19:38.852: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 1 14:19:38.852: INFO: kube-dns-v8-m8drm 192.168.122.129 Pending [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
我正在遵循本指南:http://kubernetes.io/v1.1/docs/devel/e2e-tests.html。我也看不到“kubectl get pods”中的pod kube-dns-v8-m8drm! 能帮我解决一下究竟是什么问题吗? TIA。
更新
现在,pod已经将表单挂起,直到运行,但它还在等待:
root@kube-master:~/kube_latest/kubernetes/_output/local/bin/linux/amd64# ./e2e.test --host="127.0.0.1:8080" --provider="local" --ginkgo.v=true --ginkgo.dryRun=true --kubeconfig="$HOME/.kubernetes_auth"
Feb 4 13:16:46.663: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth
Feb 4 13:16:46.664: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth
Feb 4 13:16:46.664: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
Feb 4 13:16:46.672: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb 4 13:16:46.672: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (0 seconds elapsed)
Feb 4 13:16:46.672: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 4 13:16:46.672: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 4 13:16:46.672: INFO: kube-dns-v8-m8drm 192.168.122.129 Pending []
Feb 4 13:16:46.672: INFO:
Feb 4 13:16:48.679: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb 4 13:16:48.679: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (2 seconds elapsed)
Feb 4 13:16:48.679: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 4 13:16:48.679: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 4 13:16:48.679: INFO: kube-dns-v8-m8drm 192.168.122.129 Running [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 4 13:16:48.679: INFO:
Feb 4 13:16:50.682: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb 4 13:16:50.682: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (4 seconds elapsed)
Feb 4 13:16:50.682: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 4 13:16:50.682: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 4 13:16:50.682: INFO: kube-dns-v8-m8drm 192.168.122.129 Running [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 4 13:16:50.682: INFO:
Feb 4 13:16:52.682: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb 4 13:16:52.682: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (6 seconds elapsed)
Feb 4 13:16:52.682: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 4 13:16:52.682: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 4 13:16:52.682: INFO: kube-dns-v8-m8drm 192.168.122.129 Running [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 4 13:16:52.682: INFO:
Feb 4 13:16:54.681: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb 4 13:16:54.681: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (8 seconds elapsed)
Feb 4 13:16:54.681: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb 4 13:16:54.681: INFO: POD NODE PHASE GRACE CONDITIONS
Feb 4 13:16:54.681: INFO: kube-dns-v8-m8drm 192.168.122.129 Running [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }]
Feb 4 13:16:54.681: INFO:
答案 0 :(得分:0)
“kubectl get pods”不会显示DNS pod,因为它位于kube-system命名空间而不是默认命名空间。
尝试“kubectl get pods --all-namespaces”。
我假设您设置〜/ .kubernetes_auth并根据说明运行hack / local-up-cluster.sh。
可以在文档中找到常规群集疑难解答提示: http://kubernetes.io/v1.1/docs/admin/cluster-troubleshooting.html
由于多种原因,pod可能处于Pending状态:调度程序未运行,节点没有足够的资源来调度pod,无法提取映像,...
在尝试使用e2e之前,您可能需要验证本地群集是否正常运行。
但是,因为测试需要很长时间才能运行,而某些e2e测试至少需要多个节点,所以我通常不会在本地运行e2e。我在多节点集群上运行它们。
答案 1 :(得分:0)
日志Ready False
显示dns广告连播不是running
READY
状态是3/3
吗?可能READY
状态为2/3
且RESTARTS
不是0
并且正在增加,这是我们多次遇到过的。只要dns pod真的是running
,它就会继续进行,如下所示:
NAME READY STATUS RESTARTS AGE IP NODE
kube-dns-774d5484cc-8l4s4 3/3 Running 0 1m 172.17.0.3 127.0.0.1