Docker VirtualBox with Vagrant

If you have installed Vagrant CLI (https://kenanhancer.com/2019/09/22/creating-starting-stopping-packaging-and-publishing-a-vagrant-box/), just run the following command to create docker installed virtual box.

The following command will download Vagrant box from Vagrant Cloud.

vagrant init kenanhancer/DockerMachine

This command will up and run the virtual machine in your VirtualBox. So you need to install VirtualBox as well 🙂

vagrant up

If you want to check status of virtual machine, run the following command.

vagrant status

If you want to see ports of virtual machine, run the following command.

vagrant port

to connect created virtual machine, run the following command in the Vagrantfile directory.

vagrant ssh

if you want to see details of Vagrantfile, check it as below.

Creating a Vagrant Package file

vagrant package --output dockermachine.box --vagrantfile Vagrantfile

Pushing Created Vagrant Package to Vagrant Cloud

After you create a Vagrant Package, run the following command in the package file location.

vagrant push

Kubernetes multi node cluster with Vagrant (included Kubernetes Dashboards, Grafana, Prometheus)

The following Vagrantfile code(syntax is Ruby) is creating one master node and two worker nodes for Kubernetes.

Go to Vagrantfile directory in Terminal and run the following code to create virtual machines.

The following Vagrantfile code(syntax is Ruby) is creating one master node and two worker nodes for Kubernetes.

Go to Vagrantfile directory in Terminal and run the following code to create virtual machines.

As you can see in the below picture, three virtual machines are obtained and running.

But, Kubernetes cluester is still not ready. We created just an environment to install the cluster.
Continue reading