我试图在Ubuntu Server 14.04上设置Kubernetes的单节点集群。
问题是kube-up
脚本停在中间,并且实际上没有部署集群,如下图所示。
我跟随Goole deployment guide。
我已下载1.3.5版。在`cluster / ubuntu / config-default.sh中我设置了:
export nodes="root@127.0.0.1"
export roles="ai"
export NUM_NODES=1
这是运行kube-up.sh
# KUBERNETES_PROVIDER=ubuntu ./kube-up.sh
... Starting cluster using provider: ubuntu
... calling verify-prereqs
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
... calling kube-up
~/kubernetes/cluster/ubuntu ~/kubernetes/cluster
Prepare flannel 0.5.5 release ...
Prepare etcd 2.3.1 release ...
Prepare kubernetes 1.3.5 release ...
Done! All your binaries locate in kubernetes/cluster/ubuntu/binaries directory
~/kubernetes/cluster
Deploying master and node on machine 127.0.0.1
saltbase/salt/generate-cert/make-ca-cert.sh: No such file or directory
easy-rsa.tar.gz 100% 42KB 42.4KB/s 00:00
config-default.sh 100% 5296 5.2KB/s 00:00
util.sh 100% 29KB 28.6KB/s 00:00
kubelet.conf 100% 644 0.6KB/s 00:00
kube-proxy.conf 100% 684 0.7KB/s 00:00
kubelet 100% 2158 2.1KB/s 00:00
kube-proxy 100% 2233 2.2KB/s 00:00
etcd.conf 100% 709 0.7KB/s 00:00
kube-scheduler.conf 100% 674 0.7KB/s 00:00
kube-controller-manager.conf 100% 744 0.7KB/s 00:00
kube-apiserver.conf 100% 674 0.7KB/s 00:00
kube-controller-manager 100% 2672 2.6KB/s 00:00
kube-apiserver 100% 2358 2.3KB/s 00:00
etcd 100% 2073 2.0KB/s 00:00
kube-scheduler 100% 2360 2.3KB/s 00:00
reconfDocker.sh 100% 2074 2.0KB/s 00:00
kube-controller-manager 100% 95MB 94.9MB/s 00:01
flanneld 100% 16MB 15.8MB/s 00:00
kube-apiserver 100% 105MB 104.6MB/s 00:01
etcdctl 100% 14MB 13.7MB/s 00:00
etcd 100% 16MB 15.9MB/s 00:01
kube-scheduler 100% 56MB 56.2MB/s 00:00
flanneld 100% 16MB 15.8MB/s 00:00
kubelet 100% 103MB 102.6MB/s 00:01
kube-proxy 100% 48MB 48.3MB/s 00:01
更新1:我已经关闭了kubernetes repostiroy,以确保我使用的是最新版本。我还sudo service etcd stop
这就是我现在得到的输出:
# KUBERNETES_PROVIDER=ubuntu ./kube-up.sh
... Starting cluster using provider: ubuntu
... calling verify-prereqs
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
... calling kube-up
~/take2/kubernetes/cluster/ubuntu ~/take2/kubernetes/cluster
Prepare flannel 0.5.5 release ...
Prepare etcd 2.3.1 release ...
Prepare kubernetes 1.3.5 release ...
Done! All your binaries locate in kubernetes/cluster/ubuntu/binaries directory
~/take2/kubernetes/cluster
Deploying master and node on machine 127.0.0.1
make-ca-cert.sh 100% 4136 4.0KB/s 00:00
easy-rsa.tar.gz 100% 42KB 42.4KB/s 00:00
config-default.sh 100% 5526 5.4KB/s 00:00
util.sh 100% 29KB 28.9KB/s 00:00
kubelet.conf 100% 645 0.6KB/s 00:00
kube-proxy.conf 100% 688 0.7KB/s 00:00
kubelet 100% 2158 2.1KB/s 00:00
kube-proxy 100% 2233 2.2KB/s 00:00
etcd.conf 100% 707 0.7KB/s 00:00
kube-scheduler.conf 100% 682 0.7KB/s 00:00
kube-controller-manager.conf 100% 761 0.7KB/s 00:00
kube-apiserver.conf 100% 682 0.7KB/s 00:00
kube-controller-manager 100% 2672 2.6KB/s 00:00
kube-apiserver 100% 2358 2.3KB/s 00:00
etcd 100% 2073 2.0KB/s 00:00
kube-scheduler 100% 2360 2.3KB/s 00:00
reconfDocker.sh 100% 2082 2.0KB/s 00:00
kube-controller-manager 100% 95MB 94.9MB/s 00:01
flanneld 100% 16MB 15.8MB/s 00:00
kube-apiserver 100% 105MB 104.6MB/s 00:01
etcdctl 100% 14MB 13.7MB/s 00:00
etcd 100% 16MB 15.9MB/s 00:00
kube-scheduler 100% 56MB 56.2MB/s 00:01
flanneld 100% 16MB 15.8MB/s 00:00
kubelet 100% 103MB 102.6MB/s 00:01
kube-proxy 100% 48MB 48.3MB/s 00:00
flanneld.conf 100% 579 0.6KB/s 00:00
flanneld 100% 2121 2.1KB/s 00:00
flanneld.conf 100% 570 0.6KB/s 00:00
flanneld 100% 2131 2.1KB/s 00:00
etcd start/pre-start, process 2665
Error: cannot sync with the cluster using endpoints http://127.0.0.1:4001, http://127.0.0.1:2379
Error: cannot sync with the cluster using endpoints http://127.0.0.1:4001, http://127.0.0.1:2379
Error: cannot sync with the cluster using endpoints http://127.0.0.1:4001, http://127.0.0.1:2379
Error: cannot sync with the cluster using endpoints http://127.0.0.1:4001, http://127.0.0.1:2379
Error: cannot sync with the cluster using endpoints http://127.0.0.1:4001, http://127.0.0.1:2379
Error: cannot sync with the cluster using endpoints http://127.0.0.1:4001, http://127.0.0.1:2379
Error: cannot sync with the cluster using endpoints http://127.0.0.1:4001, http://127.0.0.1:2379
更新2 - 似乎etcd无法启动,因为它无法绑定到127.0.0.1:4001,因为该地址已被使用。
这是/var/log/upstart/etcd.log
2016/08/18 22:28:57 etcd: no data-dir provided, using default data-dir ./infra.etcd
2016/08/18 22:28:57 etcd: listening for peers on http://localhost:2380
2016/08/18 22:28:57 etcd: listening for peers on http://localhost:7001
2016/08/18 22:28:57 etcd: listening for client requests on http://127.0.0.1:4001
2016/08/18 22:28:57 etcd: stopping listening for client requests on http://127.0.0.1:4001
2016/08/18 22:28:57 etcd: stopping listening for peers on http://localhost:7001
2016/08/18 22:28:57 etcd: stopping listening for peers on http://localhost:2380
2016/08/18 22:28:57 etcd: listen tcp 127.0.0.1:4001: bind: address already in use
答案 0 :(得分:0)
将/ kubernetes / server中的kubernetes-salt.tar解压缩到临时文件夹,并将saltbase文件夹复制到kubernetes / cluster