我一直试图用kubernetes来获取我的本地群集。我创建了二进制文件,我正在运行名为./hack/local-up-cluster.sh的脚本。当我运行脚本时,我收到此错误:
root@ubuntu1604:~/kubernetes# ./hack/local-up-cluster.sh
+++ [0215 00:22:00] Building go targets for linux/ppc64le:
cmd/kube-apiserver
cmd/kube-controller-manager
cmd/kube-proxy
cmd/kubectl
cmd/kubelet
plugin/cmd/kube-scheduler
+++ [0215 00:22:03] Placing binaries
curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused
API SERVER port is free, proceeding...
Detected host and ready to start services. Doing some housekeeping first...
Using GO_OUT /root/kubernetes/_output/local/bin/linux/ppc64le
Starting services now!
Starting etcd
etcd -data-dir /tmp/tmp.5C5e2WqxLN --bind-addr 127.0.0.1:4001 >/dev/null 2>/dev/null
Waiting for etcd to come up.
+++ [0215 00:22:03] On try 1, etcd: :
{"action":"set","node":{"key":"/_test","value":"","modifiedIndex":3,"createdIndex":3}}
Waiting for apiserver to come up
!!! [0215 00:22:13] Timed out waiting for apiserver: to answer at http://127.0.0.1:8080/api/v1/pods; tried 10 waiting 1 between each
Cleaning up...
知道我应该如何调试这个?
答案 0 :(得分:3)
似乎您的api-server因某些原因无法运行。检查/tmp/kube-apiserver.log上的api-server日志
答案 1 :(得分:1)
从评论中回答你的问题。代码库中有4种主要的测试类型:
hack/test-go.sh
):不要求本地群集运行;可以在本地群集运行时运行hack/test-integration.sh
):当这些测试hack/test-cmd.sh
):当这些测试test/e2e/*.go
):这些测试需要本地或远程集群