<p>This is my first attempt to install and use Kubernetes. I am trying to install an environment on Mac for developing my own apps and deploying them for test locally with Kubernetes. I am familiar with using Vagrant, VirtualBox and Docker for the same purpose. When I saw this page <a href="https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/vagrant.md" rel="noreferrer">https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/vagrant.md</a> I assumed it would be trivial. I executed these lines:</p>

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

<p>This created a master VM and a Minion, but Kubernetes seems to have failed to start on the master. On the master /var/log/salt/master is full of python Traceback errors, like this:</p>

<pre><code>2015-07-17 22:14:42,629 [cherrypy.error   ][INFO    ][3252] [17/Jul/2015:22:14:42] ENGINE Started monitor thread '_TimeoutMonitor'.
2015-07-17 22:14:42,736 [cherrypy.error   ][ERROR   ][3252] [17/Jul/2015:22:14:42] ENGINE Error in HTTP server: shutting down
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cherrypy/process/servers.py", line 187, in _start_http_thread
self.httpserver.start()
  File "/usr/lib/python2.7/site-packages/cherrypy/wsgiserver/wsgiserver2.py", line 1824, in start
    raise socket.error(msg)
error: No socket could be created
</code></pre>

<p>Vagrant is version 1.7.3. VirtualBox is version 4.3.30</p>

<p>Have I made an obvious stupid mistake?</p>

<p>I don't yet know the fix but I know what is going wrong since it happens to me as well:</p>

<ul>
<li>OS X 10.10.3</li>
<li>Vagrant 1.7.4</li>
<li>VirtualBox 4.3.30</li>
<li>Kubernetes 1.0.1</li>
</ul>

<p>When I run the default configuration of this (which creates one "master" and one "minion" VM) I see that the static IP address is not being assigned to the "eth1" interface, and I also see that the Salt API server is sitting in what appears to be an infinite retry loop because it is trying to listen on that IP address.</p>

<p>Also, the following message happened during boot:</p>

<pre><code>[vagrant@kubernetes-master ~]$ dmesg | grep eth1
[    9.321496] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
</code></pre>

<p>So basically, the static IP address didn't get assigned because eth1 wasn't ready when the system first booted, and Salt is waiting for it to get assigned.</p>

<p>I could fix this after boot by sshing to the box using "vagrant ssh" and running the command:</p>

<pre><code>sudo /etc/init.d/network restart
</code></pre>

<p>on each host.</p>

<p>This "fixes" eth1 by assigning the static IP address, and after that Salt begins to do its thing, installs Docker, boots various containers, and so on.</p>

<p>What I don't know is how to make this work every time without manual intervention. It appears to be some sort of a race condition between Vagrant and VirtualBox.</p>
