Deploy Docker image to Azure Kubernetes Service AKS from dashboard

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi developers and this video will learn how to create an azure kubernetes service IKS using the azure portal through the process of creating the cluster we'll explore options like the size of the VMs and the number of those VMs then we will connect to the dashboard in order to monitor the status or the health of our kubernetes cluster after that we'll create a first deployment using the dashboard where we specify the docker container that we want to use along with the service in order to route the user requests or the traffic and to our pods so join me to show you how we can do this so I'll do that from the Microsoft Azure portal right here so I'll go here to create a resource then from here I go and choose kubernetes service which stands for I guess I need to go through all those steps in order to create the service but this is really easy so let's get started the first step right here is to choose my subscription so here I have multiple ones so I need to choose the one in which I want to create the cluster then I need to specify the resource group and the resource group is group of resources that help us to handle all those resources as it was one resource for example for deletion editing or creation so let's create a new resource dedicated for our service so here I call it kubernetes demo then we need to specify a name for our cluster here I'll go and use again the name kubernetes - demo then the region in which my cluster will be hosted and so I sure have multiple regions and all over the world so I need to specify in which region I want to host me I'll put it in West Europe I'm fine with that then here we can choose which version we want to use for kubernetes so here I'll choose the latest version but of course you can use whatever version that starts from 17.7 I pick the latest one then we need to specify the DNS name prefix and again and used the same naming convention that I started with then here and the scale part we need to choose the virtual machine that we want to use here by default the portal suggests that we use this vm d s 2 V 2 which is a standard one and have two virtual CPUs and seven gigabits memory I'm fine with that if you want to change that to use a smaller or bigger one then I can go here and say change the size of the VM then after that you need to specify the node count and this is the number of the nodes that we want our company's service to to support so here by default it's set to 3 but here for demoing I just asked for only one one node once we are fine with that now we'll go next to the authentication process for the authentication here we will leave everything by default but here you can notice that you have some interesting options for example for the airbag store you can enable access to the kubernetes cluster through role-based access so you can define an admin user developer whatever roles you want to do add that adds to the security of your of managing your Cooper needs then we move to networking and for networking you will be I will be changing the value for HTTP client routing to say no we don't want to use it we'll be using some other technologies later I keep the network configuration too basic I don't well for this demo I am NOT going to too far for the networking then let's go to the monitoring and right here will we'll keep this enable container monitoring so that we can get insights about the health of our containers and we'll see later I will be able to see charts for the health of for these containers then we'll create a new workspace for the log analytics so that we can see in real-time look the logs coming from our kubernetes cluster let's next move to the tags and right here it's just used by a sure this is not related to the kubernetes it's used by your other subscription in order to define the services using this tag so we can you can then filter by a pricing for each tags for example then the final step is to review what we have choose it as options then from here once everything is validated for the VM the number of nodes and so on we can click the Create button once the validation passes now we can create this service and here it tells that the service or the creation is in progress and that takes around 5 minutes in order to create this cluster so if I will would wait for 5 minutes then we will come later do not wait so much here I have already created another kubernetes IKS service so if i go to resource groups right now I can find this one that I have created so here you see that it also created two other resource groups let's see each of them so let's start by the one I have created you with different name web app for KS KS algae and here we find that here we do have our a cluster if we take a look at the other resource groups created then here we see all the elements that comes our that are essential to run a kubernetes cluster so here you see you have the load balancer the public IP address disk attach it another disk availability set and we see also the virtual machine that will run at the cluster round table and so on so those are all the dependencies needed for kubernetes in order to be able to run another resource group created here is the default resource group and this one is used for log analytics let's go back to the main one for here the AKS and let's click on a KS right here so here because our service is new we don't have this dashboard that have this option for view kubernetes dashboard if I click on it then here it will show me the three needed steps or the four steps in order to be able to view the dashboard for kubernetes so first of all we need to go and install the azure CLI here you have the link used to follow the instructions and then you will be able to install it it tells that you cannot run those commands from the ad from the azure powershell or the azure a cloudian right here you need to run them from your local machine so here I have already configured the ISE IKS and style CLI under the run style to stay alive so I have done that through all the steps described in this link then here I have already configured IKS get a credentials and once you have done that or actually just run this one so I can show you how it works so here I'll paste the code from the portal and here for me because they have multiple subscriptions I need to add an attribute for my subscription so that should be - - subscription the name of my subscription which year I'm using Microsoft Azure sponsorship I click enter and what this will do it will merge the cluster or the cabinets the service that they have created with as the current context so now I'm ready to run the list the last command which is browse which will show me my my dashboard so as at that and with this one also we need to specify which subscription that hosts my IKS service so I specify again there's our subscription the name of my subscription so this is the dashboard you will get on fresh installed let's start here by creating our or by deploying our first docker image on this cluster so I'll do that using the dashboard and delay in a later video I will do that using the ml files let's start simple right here so I'll go to create and here I'll use the create an app form let's call my app angular up on Azure then here I need to specify the my docker image name so here I'll go and use this one that I have already created in the previous video so I'll copy the name of this image so this one is public so you can use it if you want go here and let's put then we need to specify the version of this one so I take the v1 tag let's use that and here for the number of these pods let's say we want to use three pods this means it will run three docker containers then for the service here we need to specify an external service because we want to expose this up to an external and point so this one will create a service you which uses the load balancer in order to be able to to access this web app from an external IP so let's say the port right here I want to use the port 80 for example and I want to map it to port 80 also let's now click deploy to start the deployment and right here you see that now we have a deployment and progress we do also have the creation of the pods and the replica sets in progress so at least we'll do it we'll go to docker hub it will pull this image that we have specified then it will try to deploy it to our three ports then it will create the service that will load or that will distribute the load to those three pods so this will take some seconds and if i refresh right here it's done now we should be able to to browse our application it just takes a bit of time in order to create the service to get an external endpoint and here within three to maximum four minutes you will get your external endpoint available so now if I go inside the service from here I can go to this external endpoint so if I click on it it will open a new window and here I can access my angular application running on docker containers running on kubernetes on Azure great so now let's go back to the dashboard and from here we can start monitoring our application will have some graphs that will display later to tell us about the health of our deployment and here we have all the information needed so we can you lose information from the dashboard but we can also view them from the terminal or from the command line so here I'll go and start a new command line because this one right here is still connected to the dashboard and here because they have already run the those three commands from the command line I'll be already connected to my kubernetes on Azure so from here I can say go back to get services for example to get the list of my services and here you see the service that we have I created its type and all the information related to that service you can also go and say covector get pods so this will give us all our three pods then we'll go and say cube city L get deployments and here are some important information about our deployment the dashboard also provides us the option to scale the deployment or or to scale our application how we can do that right here if I go to the deployment will have an option to scale so I can either go here and say I want to scale from three to five nodes or I can also go to edit the juice on a deployment file which we're here we have the property replica which tells how many no pods I want to to run for my app so here we can say we want to go from three to ten for example then I'd go and say update and this will trigger kubernetes to start a new replica set where here it will try to add another pods so currently we do have two defaults but it will try to add another seven pods in order to reach the required pods and here within some seconds it just created the tan pods or the tan replicas that each one is running my darker image I hope you like it this video and join me in the next one to show you how we can create a deployment and service not from within the dashboard as we have done today but using the deployment Yaman files
Info
Channel: Houssem Dellai
Views: 39,584
Rating: undefined out of 5
Keywords: docker, kubernetes, azure, cloud, deployment
Id: VafY-qfpM8M
Channel Id: undefined
Length: 16min 3sec (963 seconds)
Published: Sat Sep 08 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.