-In this demo, we will see how to provision the VMs required
to set up a single master2 worker node Kubernetes cluster
using VirtualBox and Vagrant on our local system.
As a prerequisite, you must have VirtualBox and Vagrant installed.
We will use a Vagrant file to automate the provisioning
of the virtual machines required for the master and worker nodes.
The Vagrant file is located in the GitHub
repository associated with this course.
We cloned this repository first by copying the repository URL
and running the git clone command followed by the URL to the repository
Once cloned, CD into the cloned directory.
Review the Vagrant file to make sure it has the right settings.
We see that we have configured the number of master nodes
to one and worker nodes to two.
The IP network range is 192.168.56.
This means that when the VMs are created,
they're going to get IP addresses within this range.
That looks good.
We come out of the file and we run the Vagrant status
command to check the status of the VMs.
Since we have not created them yet,
they are in a not-created state.
We can see the names of machines
that it would create once we provision.
They will be named kubemaster, kubenode01, and kubenode02.
We will now run the Vagrant up command to provision the VMs.
It uses the Ubuntu bionic64 base images.
The base image is pulled and the VMs are being provisioned.
Now, depending on your network bandwidth
and your host's resources, this may take some time.
Let's wait.
Now, first, the kubemaster is provisioned and then the kubenode01
is provisioned, and finally, kubenode02 gets provisioned.
We now check the status again and see that it's all in a running state.
To access one of this system, use the vagrant ssh command.
We run the vagrant ssh kubemaster command to ssh into the master node.
We are in the master node.
We will run just any command to make sure it's working.
We will run the uptime command to check if the commands are working.
Then, we will now log out of the system and test ssh connectivity
to the other nodes, node01 followed by node02.
They look good.
Now, we are all set and in the next video,
we will proceed with bootstrapping a cluster using kubeadm.