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

8/7/2016

I'm attempting get started with kubernetes and do a vagrant/virtualbox install as per http://kubernetes.io/docs/getting-started-guides/binary_release/#download-kubernetes-and-automatically-set-up-a-default-cluster

My commands are:

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

I get the following errors at the terminal:

    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.

The script then exits without completing kubernetes "master" set up and without setting up any nodes.

I am able to vagrant ssh master, but need to manually enter the default "vagrant" password.

I am running OSX 10.11.6 (15G31). I am running recent versions of virtualbox (5.0.26 r108824) and vagrant (1.8.5).

These kubernetes "getting started" instructions appear to be downloading the latest kubernetes version (1.3.4).

Because I had older virtualbox and vagrant versions installed, I made sure to completely uninstall and reinstall both, as per:

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

I assume there is something going wrong with ssh somewhere, though given that these are the published "getting started" instructions and I am using fresh installs of all components, I am surprised that this is not working right out of the box.

-- Digital Trauma
kubernetes
macos
ssh
vagrant
virtualbox

2 Answers

8/7/2016

Take a look at https://github.com/kubernetes/minikube. It's an official Kubernetes project intended to simplify this exact use case. I've been using it for a few weeks and it works great.

-- bfallik
Source: StackOverflow

8/7/2016

The easiest way to run kubernetes on OSX, I think, is by using Kube-Solo or Kube-Cluster.

Please check this repo: https://github.com/TheNewNormal/kube-cluster-osx

Note: for me is only working well with the CoreOS stable release.

-- Camil
Source: StackOverflow