How to Install Minikube on Ubuntu 20.04 LTS AWS EC2 |Deploy App on Kubernetes Cluster using Minikube

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we are going to cover install mini cube from ubuntu pc2 so the mini cube official made let's understand what is mini cube and what are the system requirement for the meaning so so this is obviously a website of mini cube so here you can see that mini cube nutrition cluster on mac os linux and windows and we broadly focus on helping application developers and new kubernetes users the real time scenario we don't use mini this is a local kubernetes cluster just for practice then so what are the features of mini cube see this in the place of mini cube what we will use yes instead of so in the real time scenario we use the cubed m cops eks in azure we have the azure kubernetes service in google we have the google kubernetes engine okay okay those things we need to buy right that's why you are explaining this on mini yes so mini cube so all are using the aws filter account okay so for other installation method except mini cube or the present method requires more than one instance so one for master one for worker with two eu minimum two cpu and four gb ram okay or maybe two gbm two cpu and zebra this requires so any every time you cannot set up the cluster and just practice and so a better way to you can set up the mini cube cluster and you can practice some of the topic on the kubernetes topic on the on the mini q okay so uh what are the highlights here supports for latest coupons latest plus six previous miner version cross cross platform linux mac os windows then deploy as a vm container or bare metal then multiple container runtime crio container d docker then dock api endpoint for blazing fast image process then advanced features such as load balancer file system mount feature gates so almost all of our components supports many then add-ons for easily installed kubernetes application so you can add add-ons and support common cia environments okay some comments around and gitlab jenkins so here we can put this so see as our pipeline docker file this drive is get laptop then this one gcp cloud bill azure pipeline so we can integrate this mini cube with the uh ci tool also like git lab and this uh team city like travis like team city and other pipeline so load balancer what are the load battery supports mini queue here we can give mini cube then we can expose our service so so here also we can get started so here to set up the mini cube okay what we need pretty good so many keep a local kubernetes focusing on making it easy to learn develop for kubernetes all you need need is docker or similarly compatible container or virtual machine environment and kubenz is a single command away mini cube start okay so what are prerequisite we need 2 cpu minimum 2 cp or more 2 gb of free memory 20 gb of 3d space then internet connection then container or virtual machine such as docker hyper kit hyper v kvm parallel spot man virtualbox vmware fusion workstation so on these environment mini cube supports so we have the airbrush filter account so we can setup on the aws ec2 instance so installation is instructions are given to set up the mini cube local kubernetes cluster so for linux mac os then architecture this one release type stable beta then installation type hd exe download windows package manager or chocolatey so here we are going to shut up on the ubuntu ec2 instance so all our comments yes then commands are here and you can more you can read about more commands all these things so here basic concept basic control of this one we find it out hopefully going through the official guide but for now this as i said you in the real time scenario we don't use suggest for practice purpose so this is enough okay so in one line word mini cube is a local kubernetes cluster so then also official guide kubernetes supports mini cube yes so here we have to open some ports also so you can read about the kubernetes port trains [Music] zero eight zero yeah so like that is there any constant uh uh port for this or it will be between uh thirty thousand two for node board service there is a service type is not what to export our micro service so this is the port page notepad service okay and you can also read we have the official guide means we have our that also i will cover so this will so this is the range okay so in uh so for master already we have seen that kubernetes has a master and worker node node we can also call it as a control plane node so here for a master node we needed these ports okay so for cube ap kubernetes api server okay used by all and port number is six four four three okay so minicube also uses the api server so every kubernetes cluster has all these components and these are the portraits so api server six four four three we have to open then etc server client api used by cube api server intercity port range this one then for cubelet api quarter number this one one zero two five zero this will port number seven then for control manager this is a port so while setting up the cluster any cluster so we have to open these ports okay otherwise the component will not work on the worker node we need a quick date api so same port number and already we have seen that cubelet is agent which is installed on the we have to install both both master and worker node this is between the master and worker node so it same port number then water node and as already we have seen that services will run on only on worker node so this is the node board services to expose our micro services so there are different services in kubernetes so one of the is notepad service okay so later remaining we will see later okay so we have to keep okay so this so to set up the any kubernetes cluster we have to open four three four api server this one quarter inch all the port number we have to open but kubernetes cluster have their automation mode method they open the all the port number by default that we will focus on the mini cube so we have to open this six four four three uh port okay so we have opened all the ports so let's ice for the official guide so let's create a ubuntu ec2 instance with the 2 cpu 2gb 20gb so let's login i have logged into the aws account so let's click on launch virtual machine and let's select the ami so here we will select the ubuntu server 20.04 lps select so we need 2 cpu and 2gb ram so which instance is good let's select that which has 2 cpu and 4gb and that's the requirement then we need a 20 gb free space so here let's keep the default setting then as well as we need 3gb then click on add text then configure group so let's say existing and i am selecting the default security group for now i have opened all the port but you can also open the port for practice and our that port range defined uh so this port number you can open for now i have opened all the ports so let's click on review and in real time it will be a security right yes yes so in the real time scenario we have to open the specific port only so then let's select the key pair then click on launch instance then click on view instance then let's give the name [Music] you can also mention master or slave worker something easy no no this is only it contains only mustang worker not only okay okay so let's connect to this issue instance something error is keeping okay so let's connect to this issue instance [Music] default username is open let's increase the font size so here we have the instruction to install the mini cube i don't know who is for instance so for the first let's update the system packages on ubuntu using the command update yes then [Music] we have to install the cube scale packages already we have seen that cubesat is a command in purpose yes [Music] so let's download the cubesat then we have to give the executable permission to the cube scheme so here we can see the cube scale is downloaded then we have to give the executable permission to this setup what is this i saw a lot lot lot of places with that comment so i support the packages now so you can this package released by the companies so they have defined that which step are recommended to configure the cube detail on the open this step we have to follow so this command i have copied from the kubernetes official guide they have said that to install the cubesat on ubuntu so first you have to download it will local download so all the executable files present in the user local okay then we can check the queue sheet version command hq sit here three [Music] central gate okay we open the port so next let's install the docker docker we okay over here installation linux so they have just installed these packages [Music] so already they are pre-required pre-requisite docker that's why they are assuming that you have already installed docker okay so that's why just they directly shared command this mini cube mini cube start okay but we are doing assurance yes uh share this url in the group so after the class we can then we have installed the talker so let's boxes [Music] pseudo screw so whenever we run any command in the docker we don't need to use pseudo right so if free wishes yes some of that some the docker commands don't run so that's why we have to add the docker into the docker group user we have to give this permission cli then docker demand services then we have to download the mini cube so this command directly they have mentioned on their official site so let's download using the girl you can see the mini cubies and then we have to give the executable permission to the mini cube then we have to move this menu to the user okay and then we can check the minute watch what is unique version 1.24 then we have to start the mini vm driver we are not using any vm driver okay we are setting up the cloud we can use either both one so let's use this one so here we are getting this one this thing due to a guest missing contract minik 1.1.3 requires contract to be installed in the roots path this requirement only for the when we install on the ubuntu ec2 instance so this for this solution we have to install this packet next okay we have to start the minute so let's start again so we are running we are out we have done instead of using the normal user okay so we need to close so you can install the tube step using cube ctl cube latex all these things so let's wait to start the mini q local kubernetes cluster it will generate local certificate also then booting up the control plane means master node preparing the master node then configure our back rules role binding [Music] then then configuring local host environment the nun driver is designed for export who need to integrate with an existing vm so most users should use the newer docker driver instead which does not require root okay then cubicle mini cube confessor will be stored in home ubuntu to use cubicle our mini cube commands as your own user you may need to request them so already we have started minicube server on the normal user so that's why we don't need this we don't we have we don't have to perform these commands okay if you are setting up the minitube cluster using the root user then you have to use this command to move your mini cube setup to the current user so for now we don't need it okay so this can also done automatically by setting up the environment mini cube and user true then verifying kubernetes components then enable addons storage provisioner default storage class then done quickly is now configured to use mini cube cluster and using the default namespace by default okay so i just say that namespace so by default default there are three name spaces so all [Music] and all our micro service can be used in default or you can create a separate name space so name space we have the separate topic so next to check the mini cube status command is mini cube status mini cube type is a control plane master node host is running cubed is running api service running cube config is configured config and mini configuration present in the home directory in a remember that in every type of kubernetes cluster every installation operator's cluster all your cluster configuration present in the your home directory okay okay configuring the normal user not in root user if you have configured user you have to move this your dot cube out into the your current user so you are using the current user only and our your cluster whether it is eks coops cubed m q spray eks aks g key so all your cluster configuration present in the home directory you have to run the ls hyphen i have an aim is to show the hidden file open directories dot q cd dot then here we can see the config file so here we can put so this is the api version okay if i was in v1 clusters certificating dot mini cube it will generate the local authentication okay version is 1.2 here you can see that all your cluster details and as we see the official document server under the one api server url okay okay in this server we can access this yes this is a local server we can't access outside so this mini cube you just the port 8443 okay then provider mini cube version name name space user name current current context mini cube how this details this is the mini cube cluster details this we can find in the home practice dot cube there was one server it automatically generated and you said you mentioned that we can use it locally so how we can use it locally every time we use that url outside in a chrome or somewhere and we will be accessing like jenkins right so how we will be using that url locally by connecting master and slave so this this will yes for this also by exposing the port numbers now so we can access whenever we deploy this one so you can access to the output so that i will show you later okay okay yeah uh command is to check the status of any queue command is equip status then verify many cube cluster con information command is cube ctl cluster info so kubernetes control plane or master is earning on the local ip8443 and core dns is running so it is also using the dns so using this dns we can access our cluster outside or we can integrate with the junk in our gitlab okay for now we are not given any name okay domain name it is you just using the local id it put for creative namespace of this proxy so this is a cluster info then to check the event of the cluster command hq still get events let's see what house we can see the events starting node sufficient memory with error no disk pressure no not ready no ready register node in controller normal starting all the events of the hour we can change finally our mini can be started then object node current ip only then [Music] to check that config view let's check this command view the equation configuration you can use this command also keeps config view or you can go to the dot cube directory and then you can do the config file both way it is possible so this is a now cluster configuration now let's run one sample applications for sample microservice so let's we have to create deployments to create to run the container on the kubernetes cluster so there are two options one is the using cubesat and other option is using the grammar okay so in the real-time scenario we use only wire mode to run the container on the kubernetes so we can use a cube stem run hello mini cube it is picking the image gcr dot io is the doctrine of registry image means google kindness this is the image port number 8080 so to run the container on kubernetes using the cubesat command is this one you still run you can give the any name and you have to give the docker registry our container register name or port number okay so all the parameter we can see the letter but this is the command so let's try this to run the container on the kubernetes mini cube starter so when we run the container it will create a pod check on the container okay so here we can see that when we run the container now so it will create a part okay what there is a container command will get passed yes in one part we can have multiple containers yes so descriptor command is cube still describe what again description name hello mini cube default start time labels annotation running ip containers which contains from very big image then port number i just seen that whenever we create a port so it get one assign ipv port number all this so this is done by the cubelet and proxy then mount so reports tear the storage and networking of the cluster so mount then condition volume then no selection you said no so where it will run so here also you can check that successfully assign default to the ip so we have the only one cluster that's why it's select if you are the multiple worker not so control scheduler job option is to schedule the pod on the free free able worker node okay in the real-time scenario so they assign first it will assign it will check that scheduler will check that default scheduler from from default scheduler what is doing successfully assign default default only we have the only one aluminium to the ip the job optionally to schedule the what our part so it checks the which node is free then according to that it will schedule the power then pulling image successfully pulled get your container started content so this can change if something error is there so you can troubleshoot by describing describing the part so you can check here event so if something is or something there are many errors in the real-time scenario so you can buy so first troubleshooting is by describing the part and one more troubleshooting is so you can check logs also so you still get parts then you can check the lock also you should get locks so excuse me locks then for me there is no log logs will display error message or something we can just consider error messages something code easier or some all connection error tv if it is not successful then it will be under logs if it is successful it will be empty okay yes yes so now so now let's create a deployment so just for so in the real time scenario we don't use the directly create a parts so rather we create a deployments okay so let's create a deployment hello node image so let's follow the official guide so all the command i took from the components official guide okay so here mini mini cube dashboard so that will start so here create a diploma so let's run this keep still create deployment hello node image this is a registry okay so here i have copied let's run this so we we are creating deployments so we have a separate topic on the pod deployment service okay so for now let's remember just just remember the name or department okay we have a separate from this so here to check the deployment command is published here you can see the [Music] okay then here then we can also deployment create parts so we can still get parts there are two parts one is the hello mini cube then one is the hello node hello node is for this then now we will expose now we have created the power deployment now we will expose so we can check the event also crystal get events then you can also configure this one now to expose our micro service to the internet we have to use the service okay service without a different topic okay from the service so so for now we will export this deployment okay so let's try using let's use our command so export deployment with the node port range okay no type is a node so there are to expose our deployment there are services like a node port load balancer cluster id okay for now we will use the node port and port report for this deployment internal port is 8 0 0 department x is exposed okay so it will create a service cubesat get service or you can use tube scale get svc so our hello node so when we set up the mini cube by default it will create one kubernetes um service cluster okay then we our deployment hello node we have export this deployment is a node code cluster ip this one internally internal port is 800 and outside we have to use this one three zero one one seven so randomly this port number assigned by the kubernetes but in the real time scenario in deployment we can assign the custom portals okay yeah now we are doing this one so this port is given by the kubernetes as an overpower so here we can use this one uh we can if it's working or not we can check using curl command let's copy the [Music] public id of this open to instance and what number is 30117 age is 16 seconds here also [Music] okay service is running here okay we can also browser also we can do the call request but it is working or not then also we can access from browser so browser we have to use this our ip ip and port number so here here also internal also we can use the mini cube ipads we need to we need to private ips this one so you can access our service using the private ip also then port number is 30117 both private and public same order also we can access this service on browser so let's copy this public id then port number is three zero one one seven so this so mean our service is working browser internet yes on the internet so we can expose microservice in the kubernetes using the we have to use the kubernetes service so this we have a separate topic on the pod deployment service okay so don't worry to delete this clean up uh this one so we can also use this uh we have the command keeps the delete so to delete comment you can use command hq delete deployment now we can see that there is no deployment nothing then also the quad will also disappear okay so this is one first one then we can also delete service also instead okay smc then let's delete the service hello and you can check that will not disappear so also we can stop the mini cube we need to delete this one for now we don't have to perform so this is all about the setting of the mini cube our local coupons cluster on the single ec2 instance and we can access
Info
Channel: DevOps Hint
Views: 3,451
Rating: undefined out of 5
Keywords: how to install minikube, minikube tutorial, minikube setup, How to Install Minikube on Ubuntu 20.04 LTS EC2, deploy app on minikube, install minikube on, install minikube on ubuntu 20.04, kubernetes tutorial, minikube explained, minikube getting started, what is minikube, ubuntu 18.04, ubuntu 20.04, minikube installation, kubernetes tutorial for beginners, minikube dashboard
Id: QNn-kF-07WM
Channel Id: undefined
Length: 41min 26sec (2486 seconds)
Published: Wed Nov 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.