Installing Kubernetes on mac with vagrant and virtualbox Installing Kubernetes on mac with vagrant and virtualbox kubernetes kubernetes

Installing Kubernetes on mac with vagrant and virtualbox


If you just want to kick the tires with Kubernetes, I'd recommend installing boot2docker and then following the Running kubernetes locally via Docker getting started guide. Once you are comfortable interacting with the Kubernetes API and want a more complex local setup, you can then work on installing Vagrant.

If the Vagrant instructions aren't working, you should also feel free to file a bug in the github repository.


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

  • OS X 10.10.3
  • Vagrant 1.7.4
  • VirtualBox 4.3.30
  • Kubernetes 1.0.1

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.

Also, the following message happened during boot:

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

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.

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

sudo /etc/init.d/network restart

on each host.

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.

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.


The tutorial pointed by Robert is realy easy to run. Just change the version to 0.21.2 (maybe 0.21.3 works too).

Else, if you prefer a vagrant solution, try with pires cluster on vagrant. It runs with almost nothing to change.