How to install Docker, Kubernetes, Kubernetes Dashboard UI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video i will show you how to set up docker and kubernetes in windows 10 so the steps are pretty simple first you will have to install docker in windows 10 then once docker is installed you will have to enable kubernetes which will allow you to use a cube ctl command from from your command prompt or your powershell and then we will be installing a kubernetes dashboard that will give you a web based ui the interface using which you can uh you can see the deployments inside your kubernetes cluster now to access kubernetes dashboard you will have to set up a user so in step four we will be creating a user then to log in you will have to generate our access token that will see how we do it in step five and once the once the access token has been generated we will be logging into our kubernetes cluster so the prerequisites of installing docker and kubernetes in windows 10 is that you will have to have your virtualization enabled uh in windows 10 and your hyper-v which is the windows hypervisor has to be enabled in windows 10 so to enable uh virtualization and hyper v in windows 10 you can follow my post the link to which is there in the description now to check if virtualization and hyper v is enabled in your windows system open up uh command prompt and type system info y s t e m info and uh in the output you would see the information related to hyper so at the end you would see that you have a so you have you will see hyper-v requirements here if you see this it means that hypervisor and virtualization is enabled and now you are ready to install docker on your system so now let's start the installation process of docker now to install docker you'll have to download the docker installer from docker.com so under product you would see docker desktop so click on that and from here you should be able to download the installer so i have actually downloaded the installer and let me run the installer to get started with the installation process of docker so now you will see that um that the docker installer has begun to install so all you have to do is to wait for some time and wait for the uh for the installation to complete so um for both of these configuration options enter click on ok to continue now the process would actually begin and let's wait for the installation to complete now you see that installation is complete so we'll have to restart our system so let me restart my system and then i will i will resume once the launcher system restarts now my system has restarted now let me start docker desktop and now once the docker starts you will see this message now you will get this warning here which is wsl2 installation is it is incomplete right now hopefully you will get this if you have ever installed wsl before that is windows sub linux subsystem for linux right this actually allows you to install linux kernel inside windows 10 so uh the new version has been has been released and it is asking me to it is asking me to install that right so i'll have to follow this link uh to open up the to get the installer so i already so i have already so i have already downloaded the installer so i can so i'll have to download it from here so i've already downloaded it here and let me install it now so let me start the installation of wsl update 62 so for 64 bit right and let's wait for the okay process to complete next and now let's wait for the process to [Music] complete now the installation is complete right now with this let me restart my docker so you see uh under task menu docker is is not has actually failed to restart right stuff actually failed to start so let me restart and it should work fine from now now linux containers with this i would be allowed to create linux containers so docker has provided support for both windows and docker windows and linux containers so with this i should be able to use linux containers as well so once the process starts docker container docker demon starts i'll show you how we can switch to windows or linux container so let's wait for the process to start so once the process starts you'll get the message that docker has started that's right initially this actually takes some time but no problem so now you see that we have got this message docker desktop is running right now let me open up my terminal command prompt or we can also use powershell now let's now let's see the version of the docker install so we have to use the command get started with docker okay let's start this so i would actually so let's let me close this one skip skip this tutorial right okay now with this you'll see that you'll you will get this message docker is running this means the docker is running and here you don't see kubernetes is running right so once we enable kubernetes you will see that also here but before that let's check the version of docker installed okay so docker version and you should you should see the result right so you have got the so we are actually using the community version right so that's it we are actually ready to go now so our docker docker is actually running on our windows system now let's enable kubernetes here to enable com so docker supports both docker swarm and kubernetes so under settings you will see this option kubernetes right so all we have to do is to enable kubernetes here and deploy kubernetes stack show system containers advanced so what it would do is that it will show you these system containers right so or it would actually show the containers that you have actually created but so let's click let's check this on also right so you'll have a better view a better view of kubernetes right and click on apply and restart right and you will get this option to install the cluster so let's get so let's get started now the installation process would actually begin so this is how simple it is to get started with kubernetes on docker right so we could do we could also set up kubernetes cluster on jeets on on gcp or aws or azure right but it would actually cost you money so this is just the a better way of building your application learning docker and kubernetes right and experimenting with things without having to spend even a single time so let's uh wait for the process to complete now here you see that kubernetes is starting right so once everything ends you will see this that kubernetes has has already started right so after kubernetes starts uh installs then we would be able to use the cli command that is the kubell the the cube ctl from our command prompt itself or from powershell so let's wait for the process to complete this will actually take some time so have patience and wait for the process to complete so now that's it kubernetes has has been installed now so now you see in the status bar you can see that the docker is running and kubernetes is also running now let's check the version of kubernetes that has been installed so type the command open command prompt and enter the command c u b e c d l so you see so you see uh so you should get this server version it means that that the that that cubesat that kubernetes is actually working right so for the for the client version and the server version you should you you should see the entry for both all these entries that you see right it has to be there this means that that that we have got access to our to our kubernetes cluster so now we are done with kubernetes installation process now let me show you some some more things here now if you look at the status bar you'll see docker kubernetes running if you right click on it you will see lots of options so i would recommend that you create an account and sign in using um using your docker hub account and under kubernetes you will this docker has got the capability to to connect to various uh kubernetes clusters right so make sure that you have that you have got docker desktop checked in here right only then you would be able to access kubernetes from docker desktop right so this was it now the thing is like from the command prompt we can actually access kubernetes like cube c tl get pods so you can run all the commands from here so because we don't really have because this is a brand new installation so we don't really have anything right so what i mean to say is that with this installation you can use the cli to actually access your your your your your kubernetes cluster but let's let's start let's install the gui version that is a web-based application that will that will that will show you your your kubernetes uh ui i mean the dashboard through which you should be able to access your your your kubernetes cluster as well so that will give you a better view of what is going on inside your cluster so by default there is no dashboard available so what we have to do is to we have to install uh kubernetes dashboard so head over to docker up right so um go to docker hub and you'll you should log in you'll have to log in with your um with with your credential if if you have not created any uh if you if you have not created docker hub amount account i recommend that you create one because only then you would be able to push images to your docker happens to your docker hub registry right so let's see so this is so in so in docker hub search for cooper latest dashboard right dashboard and you should see uh sorry go to explore right and here so here with this we should be able to search the whole docker hub register itself so cooper and kubernetes dashboard and you should see the entry over here at the bottom you see this right kubernetes dashboard by by kubernetes ui so so this has got about 10 million uh downloads and we will be using this to set up kubernetes dashboard right so let's follow the instructions here so what we have to do is that we have to follow the instruction that is given in the docker hub uh sorry in the github uh on the github page right so let's head over to the github page and at the bottom and when you scroll down you'll see the instructions so first we'll have to pull in the image so this is this is what the dashboard will actually look like so let's start off by pulling the image so let's deploy the dashboard first so copy this command right and go to your go to command prompt just paste it and enter now wait for uh for the for the dashboard to be set up right you see the dashboard is actually being set up and now it is actually done right now what we have to do is to we have to now uh now to start the dashboard right so dashboard won't you want to have the access to the dashboard automatically you'll have to start cube cdl proxy right so let's start the cube city proxy and you see our proxy is actually running now now we should be able to access our dashboard using using this url which is mentioned in the github page right so okay now you see that we are not actually able to access because we don't really have because because this service is not available so now you see that uh the error that we saw previously was was was because this the service was actually getting started right so wait for a couple of seconds and then refresh the page so you have the so we have the login page for cube for kubernetes dashboard right now what we have to do is that we have to have a token only then we will be able to log it to this dashboard right so we are not talking about cube config we are talking about token here right so let's let's create a token right so so hit so go back to the uh to the github page right and here you will see that we'll have to create the user so here you see so let's so you see create an automatic uh authentication token our back so our back means roll back success access control uh role based access control sorry so let's open this page right and we'll have to run certain um certain deployment files right so first is that we'll have to create service account so what we have to do is to copy this command right copy it paste it in your in your dash in any of any of your text editor any of the text editor now let's save it right so let's save it and let's call it as let's call it as service account so i already so uh let's uh so i have a folder so let me let me save it in in my desktop so save it as service account dot y a m l so this is a yaml file right now once this is saved head back to your let's let's go back to the folder here right now open up the terminal from here we can we can open a powershell from here right and we'll have to apply this command apply this so to implement these changes we'll have to apply it right so let's okay so the command to apply to create a service account is is that cube ctl apply f dash f followed by the file name so let's go here paste it right and then the followed by the file name so service account okay so what i have done here is that like just just start just type the few first characters of the file name so let me type service and then hit on tab so this is auto completion right and press enter now let's wait for the process to complete now now you see the service account has been created now we'll have to create a cluster rule binding similarly similarly we'll we'll copy it from your api version right till here now don't copy this eof and and cad command so this is actually for linux right so we are doing it on windows so head back to your text editor again and then and then save it as let's let's save it as cluster role binding here so uh save as cluster rule binding dot yaml okay now again the same thing we'll have to do go back to your uh now please don't close this page where you have run the cube ctrl proxy otherwise uh your dashboard will start work will will stop working so this is actually a server which is running at port 127.0 so which is your localhost right so let's let's go back to our powershell copy paste the command here so again it would be the same thing and we'll have to let's type the couple of words clusterrulebinding.yaml and hit enter so this has again been created now the third one is that we'll have to get the bearer token right so from powershell copy this right the whole command copy go back to your powershell paste it and then enter now this is the token that we are actually talking about right so copy this token you can you can save it somewhere so you don't really have to do it every time so copy it in your text editor right and this is what we are going to use right so copy now let's go back to our kubernetes dashboard under token enter enter what you have actually pasted uh copied now sign in that's it so now this is the dashboard we were actually talking about right so this is the standard kubernetes dashboard now using this we can actually monitor our cluster and then we should we should see the pods that we have actually deployed right the services that we have actually created in grass right the secrets that we have done so from here on what what happens is is that you can start working on any of your kubernetes and docker project right and and uh play around with kubernetes here right so create any application uh create the docker image push it to the docker registry right and then deploy it to your kubernetes cluster so now there is something else i wanted to show you now you see that we are in the default workspace uh sorry we are in the default name space right so once we change the names now change it to all namespaces here right and then go to the workloads now you will see now now you will see more details of all the dashboard and everything i mean all the all the parts that is actually running over here so you see all these right so so this is the kubernetes dashboard port running right and this is this storage provisioner so these are all pods that is running inside our uh our kubernetes cluster uh so after this so that's it guys so the next step is for you for you is to learn kubernetes um docker and how you deploy uh how you deploy the application to kubernetes cluster so actually we can actually deploy a java spring boot application or a node.js application to do kubernetes uh to the kubernetes cluster so thank you thanks for your time and then uh thanks for watching this video
Info
Channel: Shailesh Jha
Views: 7,058
Rating: 4.9370079 out of 5
Keywords:
Id: cgYOpw5XLtk
Channel Id: undefined
Length: 20min 52sec (1252 seconds)
Published: Sun Nov 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.