Skip to main content
In this lesson we provision a small kube-node2 cluster: one Kubernetes master and two worker nodes. We use VirtualBox as the hypervisor and Vagrant to automate VM creation and provisioning so everyone can reproduce the same environment with a single command. Tools used
  • VirtualBox — hypervisor for running the VMs.
  • Vagrant — automation tool to define, create, and provision multiple VMs from a single Vagrantfile.
Prerequisites
A screenshot of the VirtualBox "Download VirtualBox" webpage showing version 7.0.6 platform packages and download links in a browser window. The browser UI and Windows taskbar are visible at the top and bottom of the screen.
If you obtained the lesson files from a repository, clone it:
Then change into the repository and confirm the Vagrantfile and supporting folders exist:
The repository and Vagrantfile are included with the lesson materials:
A screenshot of a GitHub repository page for the "Certified Kubernetes Administrator (CKA) Course" showing the file list (docs, images, resources, etc.) and the README content. The right sidebar displays repository stats like stars, forks, and contributors.
Open the Vagrantfile to review the VM configuration. The file below defines the base box and the provisioning for the master node; worker nodes are configured further down in the same file:
What to notice in this configuration
  • The VMs use a host-only network in the 192.168.56.x range.
  • Hostnames, /etc/hosts entries, DNS, and additional configuration are applied by provisioning scripts under ubuntu/.
  • SSH port forwarding uses the pattern host_port = 2710 + i for each defined VM.
Cluster VM details (summary) Bringing up the VMs First check the current Vagrant machine state:
Before creating the machines you will see them as “not created”:
Start all VMs and run provisioning with:
Vagrant will download the ubuntu/bionic64 box if needed, create the VMs, set networking and resources, and run the provisioning scripts. This can take several minutes. Example provisioning output (abbreviated):
If you see VirtualBox Guest Additions mismatch warnings or shared folder issues during provisioning, they are common. To resolve these, either update the guest additions inside the VMs to match your host VirtualBox version or use the vagrant-vbguest plugin to automate guest additions management: https://github.com/dotless-de/vagrant-vbguest
After vagrant up finishes, verify the VMs are running:
Expected output:
Connecting to the VMs Use vagrant ssh with the VM name to open a shell on any VM:
Inside a VM you can run standard commands to verify networking and system status:
When you’re done with a VM shell, use exit or logout to return to your host. Next steps You now have three provisioned VMs (one master, two workers) reachable via vagrant ssh. Use these machines to follow the kubeadm-based Kubernetes installation and cluster configuration steps in the next lessons. Useful references

Watch Video