Hi let us understand how to do the installation of minikube as a part of linux
operating system. For demo purpose I'm going to do the installation in amazon
linux which is based out of cent os and already we saw a demo on how to launch
an ec2 instance, now I am going to quickly get an instance for installation of
minikube we need at least two CPUs and 2GB of memory. I'll select amazon linux
and as a part of instance type I'm going to select with t2 medium which will
have 2 VCPUs and 4GB of memory. Please do check the pricing page how
much it's going to get charged. Let me move on to the instance configuration
I'm going to have the default VPC and number of instances one and storage I
leave it has 8 GB, let me go ahead and add a tag, let me go ahead and create
a security group where the port 22 will be open only for my IP address. If I want I
can go ahead and reuse the existing security group as well. Let me review the
changes say launch and I'm going to use the key that I had created earlier and the
earlier session I converted this particular key from pem format to PPK format. So I
will be using the same PPK file and the configurations to log in to this specific
instance. Let me launch the instance the instance should be up and running within
few minutes. I can get the public DNS, let me copy the public DNS and wait for
the system to get started. The system is in the running state I'm going to open
the putty. We had the session save I'm going to load the same session change
the DNS and let me quickly go over the changes that we need to do, I'm going to
use the keep alive duration as 30 seconds and data username as
ec2 dash user as a part of SSH auth tab I have the PPK file selected. Let me
get into the instance after confirmation of the fingerprint I should be within the
instance. Now the installation instructions available over here I can
go ahead and check the installation instruction for linux and in case if I have
a root access and if it is a bare metal machine I can go for driver as none
where it will go ahead and do the entire installation as a part of the host itself or
otherwise I can go ahead and do the installation of the docker and that entire
kubernetes minikube will be installed as a docker. Anyway for the kubernetes to
work we need docker installation, so I'm going to go ahead and do the installation
of the docker first. Since I'm going to use docker as the container environment I
need to do the installation of docker, let me go ahead and do the installation of
docker. Let me do the system update sudo yum update dash y and let me do
the installation of docker using yum I can do the installation
sudo yum install dash y docker I will be adding all these commands
as a part of the lecture, so don't worry about the commands. You can download
the resources as a part of the lecture and reuse them. Installation of docker is done.
and the default user for the ec2 instance is ec2 user, I'm going to add this
specific user as a part of the docker group so that I don't need to provide
sudo while executing the docker command. I'm going to add the ec2 user
as a part of the docker group and let me start the docker service. So I'll issue the
command sudo service docker start. Docker will get started and the docker is
started, I'm going to enable docker as a part of system control, so that whenever
the system is getting restarted automatically docker will get started and
it's going to add a symlink so that whenever I am going to start the system
the docker service will get started automatically. For this to take effect I
need to log off and log in again. Let me check the status of the docker
Yes, docker is running with this configurations I'm going to
download the minikube package and give execute permission to it. I will be using
CURL and download minikube, so this is the link where minikube is available
it will get downloaded and I will add execute permission then I am going to
create a bin directory and do the installation of minikube as a part of bin
directory. I will create a bin directory within local, now I am going to do the
installation of minikube within the bin and for the kubernetes to work properly I
need a package called conntrack that needs to be installed or otherwise it's
going to get terminated with error message saying conntrack not installed
I can use yum to install conntrack sudo yum install dash y conntrack. Conntrack is
installed, now I am going to start the minikube. Since I have the docker
installed what I can do, I can start minikube as a docker container in case if
I doesn't provide the driver it will get installed locally as a host and I need root
permission and installing it as a docker container it will have additional
advantage, so that I don't need to make any changes to the host system directly.
So as a part of driver option I will be providing docker, as part of windows
installation we provided virtualbox, so that the entire docker installation was
installed as a virtual machine within virtualbox. Now I am going to install the
entire minikube as a docker container, minikube start dash dash driver docker
So it's going to download the base image of minikube and it will get the minikube
started as a container and to interact with this minikube I need to have the
installation of kubectl, so we will be downloading the kubectl as well and get
that installed. I'm following the same instruction that is available over here, as
a part of kubernetes website. To do the installation of kubectl I will be
downloading the kubectl latest version from the link that is provided and do the
installation. So the docker container is getting created by requesting 2 VCPU's and
2GB of memory. Installation of minikube is done basically it is going to run that as
a container. Now I need to do the installation of kubectl, let me check the
status of minikube, minikube status, so everything is running fine but I need
kubectl to interact with minikube. Now kubectl since it is not installed it will not
recognize the command, let me go ahead and do the installation of kubectl. I'll
use the CURL to download the package, let me give execute permission to
kubectl and move that as a part of bin folder, so that I can execute from any
location. I'm moving kubectl as a part of bin folder, now I can execute kubectl, let
me check the version of kubectl. So this is the version that is running within the
system. Now I can use kubectl and issue the commands, so that it will interact with
minikube. You can try kubectl there are no pods running and we do have a system
ready, so that I can go ahead and try all the commands related to kubernetes
within minikube. For test purposes I am going start echo server. Let me go ahead
and create the deployment using kubectl, let me reiterate once again don't worry
about the syntax and the commands, we are going to have detailed discussion
later. This is just to have a quick understanding how the installation to be
done and to verify whether the installation went through fine or not.
I'm going to verify the pods. So I do have this particular pods up and running and
the same way how we did the installation of dashboard I can go ahead and start
the dashboard of minikube using the command minikube space dashboard
This will enable the dashboard and the dashboard by default it will be enabled
only within the local system, for that to access from the remote system, I need to
enable proxy. So this is the URL and dynamically it's going to generate a port
and I will be in a position to access the dashboard from this URL. Don't terminate
this particular terminal or otherwise you will not be in a position to access. Now
I can go ahead and start another terminal, here I can start the kubectl proxy
so that it can accept traffic from any remote location as well as it's going to
disable the filter so basically there will not be any fire wall running and instead
of the other port that is mentioned I am going to use the port 8001, one more
thing to remember while starting the ec2 instance we did not enable the port 8001
So I need to add that specific port over here, let me get into the security group
edit the inbound rules, I'm going to add a role for 8001 from anywhere. Now
let me go ahead and get the URL, so this is the URL where I can access the
dashboard, I need to replace this particular local host IP address with the
public DNS. Let me get the public DNS and the kubeproxy is running in port 8001
so I will use the port 8001. I'm able to get the kubernetes dashboard this confirms
the installation went through fine and we do have the pods and the deployments
everything is running, I can check what are all the nodes running, so this is the
node running, I can even check the containers running as a part of docker, so
the enter minikube is being executed as a container. So here I do have the port
mapping, here I do have the details on when the container was started and the
container ID. So what did we do we did the installation of minikube as a part of
the linux operating system. Here we use the docker as the driver, so the entire
minikube got installed as a docker container and while doing the installation
of the complete cluster we will be installing the individual components and
we will be natively doing the installation against the linux operating system. Now
we do have enough infrastructure to try out various options available as a part of
kubernetes. To get the running status of minikube I can issue the command
minikube status and in case if I wanted to stop it I can issue the command
minikube stop. So it's going to stop the container running with
any minikube and the system should be clean.