1
00:00:00,000 --> 00:00:10,500
Hi let us understand how to do the installation of minikube as a part of linux

2
00:00:10,500 --> 00:00:14,833
operating system. For demo purpose I'm going to do the installation in amazon

3
00:00:14,833 --> 00:00:20,999
linux which is based out of cent os and already we saw a demo on how to launch

4
00:00:21,000 --> 00:00:25,833
an ec2 instance, now I am going to quickly get an instance for installation of

5
00:00:25,833 --> 00:00:35,199
minikube we need at least two CPUs and 2GB of memory. I'll select amazon linux

6
00:00:35,200 --> 00:00:39,933
and as a part of instance type I'm going to select with t2 medium which will

7
00:00:39,933 --> 00:00:46,799
have 2 VCPUs and 4GB of memory. Please do check the pricing page how

8
00:00:46,800 --> 00:00:51,933
much it's going to get charged. Let me move on to the instance configuration

9
00:00:51,933 --> 00:00:56,199
I'm going to have the default VPC and number of instances one and storage I

10
00:00:56,200 --> 00:01:03,500
leave it has 8 GB, let me go ahead and add a tag, let me go ahead and create

11
00:01:03,500 --> 00:01:09,200
a security group where the port 22 will be open only for my IP address. If I want I

12
00:01:09,200 --> 00:01:14,200
can go ahead and reuse the existing security group as well. Let me review the

13
00:01:14,200 --> 00:01:20,966
changes say launch and I'm going to use the key that I had created earlier and the

14
00:01:20,966 --> 00:01:26,066
earlier session I converted this particular key from pem format to PPK format. So I

15
00:01:26,066 --> 00:01:29,999
will be using the same PPK file and the configurations to log in to this specific

16
00:01:30,000 --> 00:01:35,566
instance. Let me launch the instance the instance should be up and running within

17
00:01:35,566 --> 00:01:42,799
few minutes. I can get the public DNS, let me copy the public DNS and wait for

18
00:01:42,800 --> 00:01:47,400
the system to get started. The system is in the running state I'm going to open

19
00:01:47,400 --> 00:01:54,333
the putty. We had the session save I'm going to load the same session change

20
00:01:54,333 --> 00:02:00,899
the DNS and let me quickly go over the changes that we need to do, I'm going to

21
00:02:00,900 --> 00:02:06,166
use the keep alive duration as 30 seconds and data username as

22
00:02:06,166 --> 00:02:14,399
ec2 dash user as a part of SSH auth tab I have the PPK file selected. Let me

23
00:02:14,400 --> 00:02:19,233
get into the instance after confirmation of the fingerprint I should be within the

24
00:02:19,233 --> 00:02:24,266
instance. Now the installation instructions available over here I can

25
00:02:24,266 --> 00:02:29,866
go ahead and check the installation instruction for linux and in case if I have

26
00:02:29,866 --> 00:02:35,499
a root access and if it is a bare metal machine I can go for driver as none

27
00:02:35,500 --> 00:02:40,300
where it will go ahead and do the entire installation as a part of the host itself or

28
00:02:40,300 --> 00:02:45,400
otherwise I can go ahead and do the installation of the docker and that entire

29
00:02:45,400 --> 00:02:50,666
kubernetes minikube will be installed as a docker. Anyway for the kubernetes to

30
00:02:50,666 --> 00:02:54,566
work we need docker installation, so I'm going to go ahead and do the installation

31
00:02:54,566 --> 00:02:59,699
of the docker first. Since I'm going to use docker as the container environment I

32
00:02:59,700 --> 00:03:03,766
need to do the installation of docker, let me go ahead and do the installation of

33
00:03:03,766 --> 00:03:14,666
docker. Let me do the system update sudo yum update dash y and let me do

34
00:03:14,666 --> 00:03:18,832
the installation of docker using yum I can do the installation

35
00:03:18,833 --> 00:03:24,099
sudo yum install dash y docker I will be adding all these commands

36
00:03:24,100 --> 00:03:29,666
as a part of the lecture, so don't worry about the commands. You can download

37
00:03:29,666 --> 00:03:35,566
the resources as a part of the lecture and reuse them. Installation of docker is done.

38
00:03:35,566 --> 00:03:41,899
and the default user for the ec2 instance is ec2 user, I'm going to add this

39
00:03:41,900 --> 00:03:46,533
specific user as a part of the docker group so that I don't need to provide

40
00:03:46,533 --> 00:03:51,499
sudo while executing the docker command. I'm going to add the ec2 user

41
00:03:51,500 --> 00:03:58,233
as a part of the docker group and let me start the docker service. So I'll issue the

42
00:03:58,233 --> 00:04:06,066
command sudo service docker start. Docker will get started and the docker is

43
00:04:06,066 --> 00:04:11,032
started, I'm going to enable docker as a part of system control, so that whenever

44
00:04:11,033 --> 00:04:15,699
the system is getting restarted automatically docker will get started and

45
00:04:15,700 --> 00:04:20,266
it's going to add a symlink so that whenever I am going to start the system

46
00:04:20,266 --> 00:04:24,499
the docker service will get started automatically. For this to take effect I

47
00:04:24,500 --> 00:04:33,833
need to log off and log in again. Let me check the status of the docker

48
00:04:33,833 --> 00:04:38,366
Yes, docker is running with this configurations I'm going to

49
00:04:38,366 --> 00:04:43,999
download the minikube package and give execute permission to it. I will be using

50
00:04:44,000 --> 00:04:51,200
CURL and download minikube, so this is the link where minikube is available

51
00:04:51,200 --> 00:04:57,000
it will get downloaded and I will add execute permission then I am going to

52
00:04:57,000 --> 00:05:01,833
create a bin directory and do the installation of minikube as a part of bin

53
00:05:01,833 --> 00:05:07,399
directory. I will create a bin directory within local, now I am going to do the

54
00:05:07,400 --> 00:05:14,666
installation of minikube within the bin and for the kubernetes to work properly I

55
00:05:14,666 --> 00:05:18,766
need a package called conntrack that needs to be installed or otherwise it's

56
00:05:18,766 --> 00:05:22,999
going to get terminated with error message saying conntrack not installed

57
00:05:23,000 --> 00:05:30,433
I can use yum to install conntrack sudo yum install dash y conntrack. Conntrack is

58
00:05:30,433 --> 00:05:35,366
installed, now I am going to start the minikube. Since I have the docker

59
00:05:35,366 --> 00:05:41,399
installed what I can do, I can start minikube as a docker container in case if

60
00:05:41,400 --> 00:05:46,400
I doesn't provide the driver it will get installed locally as a host and I need root

61
00:05:46,400 --> 00:05:50,866
permission and installing it as a docker container it will have additional

62
00:05:50,866 --> 00:05:56,099
advantage, so that I don't need to make any changes to the host system directly.

63
00:05:56,100 --> 00:06:00,900
So as a part of driver option I will be providing docker, as part of windows

64
00:06:00,900 --> 00:06:05,400
installation we provided virtualbox, so that the entire docker installation was

65
00:06:05,400 --> 00:06:10,966
installed as a virtual machine within virtualbox. Now I am going to install the

66
00:06:10,966 --> 00:06:19,399
entire minikube as a docker container, minikube start dash dash driver docker

67
00:06:19,400 --> 00:06:24,133
So it's going to download the base image of minikube and it will get the minikube

68
00:06:24,133 --> 00:06:28,499
started as a container and to interact with this minikube I need to have the

69
00:06:28,500 --> 00:06:33,400
installation of kubectl, so we will be downloading the kubectl as well and get

70
00:06:33,400 --> 00:06:37,766
that installed. I'm following the same instruction that is available over here, as

71
00:06:37,766 --> 00:06:41,399
a part of kubernetes website. To do the installation of kubectl I will be

72
00:06:41,400 --> 00:06:46,200
downloading the kubectl latest version from the link that is provided and do the

73
00:06:46,200 --> 00:06:51,866
installation. So the docker container is getting created by requesting 2 VCPU's and

74
00:06:51,866 --> 00:06:57,599
2GB of memory. Installation of minikube is done basically it is going to run that as

75
00:06:57,600 --> 00:07:02,700
a container. Now I need to do the installation of kubectl, let me check the

76
00:07:02,700 --> 00:07:07,933
status of minikube, minikube status, so everything is running fine but I need

77
00:07:07,933 --> 00:07:13,766
kubectl to interact with minikube. Now kubectl since it is not installed it will not

78
00:07:13,766 --> 00:07:18,966
recognize the command, let me go ahead and do the installation of kubectl. I'll

79
00:07:18,966 --> 00:07:24,566
use the CURL to download the package, let me give execute permission to

80
00:07:24,566 --> 00:07:29,832
kubectl and move that as a part of bin folder, so that I can execute from any

81
00:07:29,833 --> 00:07:36,133
location. I'm moving kubectl as a part of bin folder, now I can execute kubectl, let

82
00:07:36,133 --> 00:07:40,399
me check the version of kubectl. So this is the version that is running within the

83
00:07:40,400 --> 00:07:45,466
system. Now I can use kubectl and issue the commands, so that it will interact with

84
00:07:45,466 --> 00:07:52,332
minikube. You can try kubectl there are no pods running and we do have a system

85
00:07:52,333 --> 00:07:56,399
ready, so that I can go ahead and try all the commands related to kubernetes

86
00:07:56,400 --> 00:08:02,133
within minikube. For test purposes I am going start echo server. Let me go ahead

87
00:08:02,133 --> 00:08:06,466
and create the deployment using kubectl, let me reiterate once again don't worry

88
00:08:06,466 --> 00:08:09,732
about the syntax and the commands, we are going to have detailed discussion

89
00:08:09,733 --> 00:08:15,299
later. This is just to have a quick understanding how the installation to be

90
00:08:15,300 --> 00:08:19,466
done and to verify whether the installation went through fine or not.

91
00:08:19,466 --> 00:08:25,266
I'm going to verify the pods. So I do have this particular pods up and running and

92
00:08:25,266 --> 00:08:30,099
the same way how we did the installation of dashboard I can go ahead and start

93
00:08:30,100 --> 00:08:35,200
the dashboard of minikube using the command minikube space dashboard

94
00:08:35,200 --> 00:08:39,933
This will enable the dashboard and the dashboard by default it will be enabled

95
00:08:39,933 --> 00:08:45,533
only within the local system, for that to access from the remote system, I need to

96
00:08:45,533 --> 00:08:52,533
enable proxy. So this is the URL and dynamically it's going to generate a port

97
00:08:52,533 --> 00:08:57,999
and I will be in a position to access the dashboard from this URL. Don't terminate

98
00:08:58,000 --> 00:09:02,633
this particular terminal or otherwise you will not be in a position to access. Now

99
00:09:02,633 --> 00:09:09,699
I can go ahead and start another terminal, here I can start the kubectl proxy

100
00:09:09,700 --> 00:09:14,800
so that it can accept traffic from any remote location as well as it's going to

101
00:09:14,800 --> 00:09:20,066
disable the filter so basically there will not be any fire wall running and instead

102
00:09:20,066 --> 00:09:25,032
of the other port that is mentioned I am going to use the port 8001, one more

103
00:09:25,033 --> 00:09:32,833
thing to remember while starting the ec2 instance we did not enable the port 8001

104
00:09:32,833 --> 00:09:39,733
So I need to add that specific port over here, let me get into the security group

105
00:09:39,733 --> 00:09:55,033
edit the inbound rules, I'm going to add a role for 8001 from anywhere. Now

106
00:09:55,033 --> 00:10:00,799
let me go ahead and get the URL, so this is the URL where I can access the

107
00:10:00,800 --> 00:10:05,166
dashboard, I need to replace this particular local host IP address with the

108
00:10:05,166 --> 00:10:13,766
public DNS. Let me get the public DNS and the kubeproxy is running in port 8001

109
00:10:13,766 --> 00:10:21,999
so I will use the port 8001. I'm able to get the kubernetes dashboard this confirms

110
00:10:22,000 --> 00:10:27,333
the installation went through fine and we do have the pods and the deployments

111
00:10:27,333 --> 00:10:31,833
everything is running, I can check what are all the nodes running, so this is the

112
00:10:31,833 --> 00:10:38,333
node running, I can even check the containers running as a part of docker, so

113
00:10:38,333 --> 00:10:46,066
the enter minikube is being executed as a container. So here I do have the port

114
00:10:46,066 --> 00:10:51,899
mapping, here I do have the details on when the container was started and the

115
00:10:51,900 --> 00:10:57,400
container ID. So what did we do we did the installation of minikube as a part of

116
00:10:57,400 --> 00:11:01,866
the linux operating system. Here we use the docker as the driver, so the entire

117
00:11:01,866 --> 00:11:06,799
minikube got installed as a docker container and while doing the installation

118
00:11:06,800 --> 00:11:11,966
of the complete cluster we will be installing the individual components and

119
00:11:11,966 --> 00:11:16,799
we will be natively doing the installation against the linux operating system. Now

120
00:11:16,800 --> 00:11:21,666
we do have enough infrastructure to try out various options available as a part of

121
00:11:21,666 --> 00:11:26,899
kubernetes. To get the running status of minikube I can issue the command

122
00:11:26,900 --> 00:11:36,233
minikube status and in case if I wanted to stop it I can issue the command

123
00:11:36,233 --> 00:11:40,633
minikube stop. So it's going to stop the container running with

124
00:11:40,633 --> 00:11:45,499
any minikube and the system should be clean.

