1
00:00:00,000 --> 00:00:09,900
Hi in the earlier lecture we saw what are all the components involved as a part of

2
00:00:09,900 --> 00:00:15,266
kubernetes cluster. Now we are going to start with the installation of single node

3
00:00:15,266 --> 00:00:20,066
cluster that is minikube, where all the components will be made to run in a

4
00:00:20,066 --> 00:00:25,199
single instance. As we discussed earlier the installation of minikube involves two

5
00:00:25,200 --> 00:00:30,300
components, one is the minikube as such and then kubectl that is the client that's going

6
00:00:30,300 --> 00:00:35,766
to interact with minikube and minikube it's available as a VM or it can be

7
00:00:35,766 --> 00:00:41,066
installed as a native component, if the operating system is of linux or mac os.

8
00:00:41,066 --> 00:00:45,599
Now I am going to demonstrate how to do the installation within windows.

9
00:00:45,600 --> 00:00:50,300
Now let's go through the prerequisites the first thing is we need to have oracle VM and that can

10
00:00:50,300 --> 00:00:55,433
be downloaded from oracle VM website and and once the windows virtualization

11
00:00:55,433 --> 00:00:59,633
is enabled I can go ahead and do the installation of oracle VM. Immediately

12
00:00:59,633 --> 00:01:04,632
after installing there will not be any VM visible and in my case I do have the other

13
00:01:04,632 --> 00:01:08,866
VM's for different purpose, I'm not going to worry about it, I am going to download

14
00:01:08,866 --> 00:01:15,166
the minikube from kubernetes website. If I get into kubernetes website here I do

15
00:01:15,166 --> 00:01:18,266
have the instructions to do the installation for various operating

16
00:01:18,266 --> 00:01:22,999
systems and to have understanding on whether this system met the prerequisite

17
00:01:23,000 --> 00:01:26,833
or not I can execute the command system info that's going to give me the

18
00:01:26,833 --> 00:01:31,199
information on hyper-v whether it is enabled or not, as a part of the command

19
00:01:31,200 --> 00:01:35,833
prompt I have executed the command and got this particular output. That means the

20
00:01:35,833 --> 00:01:41,033
hypervisor and virtualization is enabled and within windows I do have option

21
00:01:41,033 --> 00:01:47,499
to download the windows installer that is minikube installer.exe and execute it. This

22
00:01:47,500 --> 00:01:52,533
is an exe file, so I can directly download and execute it before that I need to make

23
00:01:52,533 --> 00:01:58,199
sure the virtualbox or hyper-v is installed and I need to have the installation of

24
00:01:58,200 --> 00:02:03,200
kubectl as well. Kubectl can be downloaded as a installer and I can add

25
00:02:03,200 --> 00:02:08,100
the location into the path. Already I have downloaded kubectl from this specific

26
00:02:08,100 --> 00:02:13,866
location, by clicking this specific link and it's added in the windows directory in this

27
00:02:13,866 --> 00:02:18,566
specific location. I have kubectl downloaded and it is available over here.

28
00:02:18,566 --> 00:02:25,132
and I can add this particular location within the path. So I can get into the

29
00:02:25,133 --> 00:02:33,199
system properties, advanced system settings, environmental variable as a part

30
00:02:33,200 --> 00:02:40,933
of system variables I can edit the path and add the location where I do have the

31
00:02:40,933 --> 00:02:47,266
kubectl exe, this will enable me to execute the kubectl command from any

32
00:02:47,266 --> 00:02:53,499
location. Let me open the powershell I can open the powershell shift and right click

33
00:02:53,500 --> 00:02:57,500
will give me this option to open the powershell or command prompt. Here I can

34
00:02:57,500 --> 00:03:04,966
provide the command kubectl and this is the client which will facilitate me to

35
00:03:04,966 --> 00:03:09,399
interact with the minikube. Now I am going to install the minikube, let me go

36
00:03:09,400 --> 00:03:14,300
ahead and run the installer. Let me move on to the next screen already I have done

37
00:03:14,300 --> 00:03:18,800
the installation, I'm going to go till the last screen, here is where the minikube is

38
00:03:18,800 --> 00:03:24,066
installed I can open the specific location within program files kubernetes minikube

39
00:03:24,066 --> 00:03:28,566
minikube is installed, the same location is added within the path as well. So I will

40
00:03:28,566 --> 00:03:32,532
be in a position to execute the minikube command as well. So once the

41
00:03:32,533 --> 00:03:39,133
installation gets over I can execute the command minikube. This is going to

42
00:03:39,133 --> 00:03:43,933
provide me the options that I can provide as a part of minikube. Now I'm going to

43
00:03:43,933 --> 00:03:49,399
use the minikube command to start the VM. I can provide the command minikube

44
00:03:49,400 --> 00:03:55,800
status, so there is no host kubelet or API server nothing is installed. Now let me go

45
00:03:55,800 --> 00:04:01,866
ahead and start the minikube and I need to provide the driver as virtualbox. As I do

46
00:04:01,866 --> 00:04:07,199
have a virtual box as the hypervisor, I'm going to provide driver as virtualbox

47
00:04:07,200 --> 00:04:17,266
minikube start driver virtualbox. Now it will communicate with the virtual box

48
00:04:17,266 --> 00:04:21,999
and check whether the minikube VM is existing if it is not existing it will go

49
00:04:22,000 --> 00:04:27,366
ahead and create one. I don't have the minikube VM, so it's going to download

50
00:04:27,366 --> 00:04:31,999
the VM that is the image and it will create the virtual machine, it is creating the

51
00:04:32,000 --> 00:04:39,833
virtual machine with two CPUs and 4GB of memory and disk as 20 GB and check

52
00:04:39,833 --> 00:04:45,666
the status of the VM minikube VM is created and it is running within the VM

53
00:04:45,666 --> 00:04:50,499
required softwares like kubernetes and docker will get installed, required addon

54
00:04:50,500 --> 00:04:56,666
will get added into the VM and kubectl will be configured to use the minikube

55
00:04:56,666 --> 00:05:03,432
host. Now I can go ahead and check the status of minikube. I do have the

56
00:05:03,433 --> 00:05:08,166
information kube configuration is done API server is running kubelet is running

57
00:05:08,166 --> 00:05:14,232
host is running. So what happened one VM got installed and all the components

58
00:05:14,233 --> 00:05:20,366
is installed in a single system. So within the single system I will be having all the

59
00:05:20,366 --> 00:05:26,732
components that is kube scheduler, controller, API sever, etcd everything will

60
00:05:26,733 --> 00:05:31,633
get installed in a single host and I will be in a position to communicate with the

61
00:05:31,633 --> 00:05:38,733
API server using the kubectl. Now I can use the kubectl command say for

62
00:05:38,733 --> 00:05:46,599
example get pods. There are no pods available. Now let me go ahead and create

63
00:05:46,600 --> 00:05:51,366
a small deployment and don't worry about the syntax we will be discussing

64
00:05:51,366 --> 00:05:55,599
detail on the syntax this is just to verify whether the installation went through

65
00:05:55,600 --> 00:06:00,033
fine or not and I will be adding all the commands as a part of resources within

66
00:06:00,033 --> 00:06:04,799
each and every lecture, so you can copy paste the same command in your demo

67
00:06:04,800 --> 00:06:09,166
environment as well. So I'm going to create something called deployment and

68
00:06:09,166 --> 00:06:13,599
I will be giving a name hello minikube and I will use the image available within

69
00:06:13,600 --> 00:06:19,333
this specific location. This is a popular sample called echo server which is going

70
00:06:19,333 --> 00:06:24,366
to provide the meta information about the server, so a pod should get created

71
00:06:24,366 --> 00:06:29,032
now let me go ahead and check the pods available. I do have one pod this is

72
00:06:29,033 --> 00:06:34,233
the name of the pod and the status it is saying container is getting created. After

73
00:06:34,233 --> 00:06:38,166
few minutes it should be up and running in the meantime let me go ahead and

74
00:06:38,166 --> 00:06:43,832
start another useful add on called dash board. I can give the command minikube

75
00:06:43,833 --> 00:06:49,399
dashboard which will start a dashboard and that will be running locally within the

76
00:06:49,400 --> 00:06:56,066
same system and I will be in a position to access using the URL. The specific URL

77
00:06:56,066 --> 00:07:02,599
and the port it will be different for different users, so copy the same link

78
00:07:02,600 --> 00:07:07,800
that you are getting over here and this is going to give visual information on what

79
00:07:07,800 --> 00:07:12,066
are the deployments, what are all the pods running, what are all their status and

80
00:07:12,066 --> 00:07:16,199
this is the actual dashboard we will be using it in production to get the entire

81
00:07:16,200 --> 00:07:21,200
information about the cluster. We will have the complete details on how many

82
00:07:21,200 --> 00:07:26,133
nodes running and we do have only one node as we are running minikube only

83
00:07:26,133 --> 00:07:30,533
one node is running and the resource utilization every information we can get from this

84
00:07:30,533 --> 00:07:34,799
specific dashboard. So deployment of the pod as well as the dashboard gives us

85
00:07:34,800 --> 00:07:38,333
the confirmation the installation went through fine within windows operating

86
00:07:38,333 --> 00:07:43,799
system and once if I come out of this particular control the dashboard will stop

87
00:07:43,800 --> 00:07:49,066
working, in case if I wanted to run some other commands do open another

88
00:07:49,066 --> 00:07:55,299
terminal. So you can open a powershell and provide the commands kubectl get

89
00:07:55,300 --> 00:08:02,166
pods. So I do have one pod which is in the running state. After you're done with the

90
00:08:02,166 --> 00:08:06,199
demo in case if you wanted to stop the virtualbox you can run that command

91
00:08:06,200 --> 00:08:11,533
minikube space stop that will stop the virtualbox that is running the virtualbox

92
00:08:11,533 --> 00:08:16,599
minikube will get into the powered off state. To start I can use the command

93
00:08:16,600 --> 00:08:23,266
minikube start and then the driver virtualbox, the virtualbox that is already

94
00:08:23,266 --> 00:08:28,832
existing will get started automatically. So it will identify the virtualbox mini cube is

95
00:08:28,833 --> 00:08:33,899
already existing and it'll get into the starting state. In case if the minikube is

96
00:08:33,900 --> 00:08:40,066
not required I can go ahead stop it and delete them. minikube stop that will stop

97
00:08:40,066 --> 00:08:48,099
the VM and issue the command minikube delete. So that will delete the

98
00:08:48,100 --> 00:08:53,500
virtualbox I can go ahead and verify it within the virtual box and it is deleted.

99
00:08:53,500 --> 00:08:57,933
So in a quick summary we had seen what are all the prerequisites to do the installation of

100
00:08:57,933 --> 00:09:01,999
minikube as a part of windows operating system and do the installation and check

101
00:09:02,000 --> 00:09:07,500
whether the kubectl command is working along with minikube dashboard.

