Creating a VM with Vagrant and VirtualBox

This section is appropriate for those using Docker for Mac or Windows, minikube, minishift, or anyone else planning to use static nodes as agents.

We'll use Vagrant (https://www.vagrantup.com/) to create a local VM. Please install it if you do not have it already.

The Vagrantfile we'll use is already available inside the vfarcic/k8s-specs (https://github.com/vfarcic/k8s-specs). It's in the cd/docker-build directory, so let's go there and take a quick look at the definition.

 1  cd cd/docker-build 2
 3  cat Vagrantfile

The output of the latter command is as follows.

# vi: set ft=ruby :

Vagrant.configure("2") do |config|
    config.vm.box = "ubuntu/xenial64"

    config.vm.define "docker-build" do |node|
        node.vm.hostname ...

Get The DevOps 2.4 Toolkit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.