无法在 vagrant/virtualbox 下的 OSX 主机上安装基本 kubernetes

Unable to install basic kubernetes on OSX host under vagrant/virtualbox

我正在尝试开始使用 kubernetes 并按照 http://kubernetes.io/docs/getting-started-guides/binary_release/#download-kubernetes-and-automatically-set-up-a-default-cluster

进行 vagrant/virtualbox 安装

我的命令是:

export KUBERNETES_PROVIDER=vagrant
curl -sS https://get.k8s.io | bash

我在终端收到以下错误:

    master: Vagrant insecure key detected. Vagrant will automatically replace
    master: this with a newly generated keypair for better security.
    master: 
    master: Inserting generated public key within guest...
    master: Removing insecure key from the guest if it's present...
    master: Key inserted! Disconnecting and reconnecting using new SSH key...
    master: Warning: Authentication failure. Retrying...
<snip>
    master: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

然后脚本退出,没有完成 kubernetes "master" 设置,也没有设置任何节点。

我可以vagrant ssh master,但需要手动输入默认"vagrant"密码。

我是 运行 OSX 10.11.6 (15G31)。我是 运行 最近版本的 virtualbox (5.0.26 r108824) 和 vagrant (1.8.5)。

这些 kubernetes "getting started" 说明似乎正在下载最新的 kubernetes 版本 (1.3.4)。

因为我安装了较旧的 virtualbox 和 vagrant 版本,所以我确保完全卸载并重新安装,按照:

https://www.virtualbox.org/manual/ch02.html#idm871 https://www.vagrantup.com/docs/installation/uninstallation.html

我假设 ssh 某处出了问题,尽管考虑到这些是已发布的 "getting started" 说明并且我正在使用所有组件的全新安装,我很惊讶这无法正常工作盒子。

我认为 OSX 上 运行 kubernetes 的最简单方法是使用 Kube-Solo 或 Kube-Cluster。

请检查此回购: https://github.com/TheNewNormal/kube-cluster-osx

注意:对我来说,只在 CoreOS 稳定版上运行良好。

看看https://github.com/kubernetes/minikube。这是一个官方 Kubernetes 项目,旨在简化这个确切的用例。我已经使用它几个星期了,效果很好。