WEBVTT

00:00.310 --> 00:03.480
-In this demo, we will see how
to provision the VMs required

00:03.480 --> 00:07.690
to set up a single master2
worker node Kubernetes cluster

00:08.020 --> 00:11.400
using VirtualBox and
Vagrant on our local system.

00:12.110 --> 00:16.410
As a prerequisite, you must have
VirtualBox and Vagrant installed.

00:17.450 --> 00:20.660
We will use a Vagrant file to
automate the provisioning

00:20.660 --> 00:23.790
of the virtual machines required for
the master and worker nodes.

00:24.580 --> 00:26.880
The Vagrant file is located
in the GitHub

00:26.880 --> 00:29.090
repository associated
with this course.

00:29.750 --> 00:33.550
We cloned this repository first
by copying the repository URL

00:33.930 --> 00:38.470
and running the git clone command
followed by the URL to the repository

00:42.850 --> 00:45.770
Once cloned, CD into
the cloned directory.

00:48.310 --> 00:51.400
Review the Vagrant file to
make sure it has the right settings.

00:53.150 --> 00:55.910
We see that we have configured
the number of master nodes

00:55.910 --> 00:57.870
to one and worker nodes
to two.

00:58.410 --> 01:02.370
The IP network range is
192.168.56.

01:03.790 --> 01:05.670
This means that when
the VMs are created,

01:05.670 --> 01:08.540
they're going to get IP addresses
within this range.

01:09.630 --> 01:10.500
That looks good.

01:11.050 --> 01:14.380
We come out of the file
and we run the Vagrant status

01:14.380 --> 01:16.720
command to check the
status of the VMs.

01:17.010 --> 01:18.890
Since we have not created
them yet,

01:19.550 --> 01:21.760
they are in a not-created
state.

01:22.430 --> 01:24.180
We can see the names
of machines

01:24.180 --> 01:26.190
that it would create once
we provision.

01:26.600 --> 01:31.020
They will be named kubemaster,
kubenode01, and kubenode02.

01:31.730 --> 01:34.990
We will now run the Vagrant up
command to provision the VMs.

01:37.240 --> 01:40.280
It uses the Ubuntu bionic64
base images.

01:40.950 --> 01:44.330
The base image is pulled and
the VMs are being provisioned.

01:44.700 --> 01:47.000
Now, depending on
your network bandwidth

01:47.000 --> 01:50.750
and your host's resources,
this may take some time.

01:51.170 --> 01:52.130
Let's wait.

01:53.460 --> 01:57.720
Now, first, the kubemaster is
provisioned and then the kubenode01

01:57.720 --> 02:01.720
is provisioned, and finally,
kubenode02 gets provisioned.

02:11.400 --> 02:15.400
We now check the status again
and see that it's all in a running state.

02:16.320 --> 02:20.030
To access one of this system,
use the vagrant ssh command.

02:20.030 --> 02:25.910
We run the vagrant ssh kubemaster
command to ssh into the master node.

02:26.410 --> 02:27.790
We are in the master node.

02:28.120 --> 02:31.000
We will run just any command
to make sure it's working.

02:31.000 --> 02:35.840
We will run the uptime command to
check if the commands are working.

02:36.170 --> 02:40.470
Then, we will now log out of
the system and test ssh connectivity

02:40.470 --> 02:50.900
to the other nodes, node01
followed by node02.

02:55.230 --> 02:56.280
They look good.

02:57.280 --> 02:59.990
Now, we are all set and in
the next video,

02:59.990 --> 03:04.490
we will proceed with bootstrapping
a cluster using kubeadm.

