 ご Fuj soul � భిలాగి లికిరాగాడియికిండింగిందికి. మాకినిందిలాగికికి. దిదిమరికి మిలాకికిని. లికిరాకికికిత౾ని. పంపికిరికి. So nec Cal app run on dotneco ASc, e死 cut not need framework. So dis service, theroc nackle, is calledació, is a managed cross ma from Web server. You typically run behind, in the production software, iis, the engines. So there are various ways and different ways to publish and deploy. Neco app so I listed some of them here. You can publish your app to IIS and you can publish your apps on FTP server and you can publish your app to a container registry that works with doc and images which is what we are going to be looking at today. So what's a Kubernetes service? It's a logical abstraction for deployed equal ports in a cluster that's typically like performed same function. So there's AKS which is Azure Kubernetes service and what helps you do is it helps it helps simplify your deployment process so your workload or your operational overhead is handed over to Azure and so what Azure does is it handles like critical tasks for you tasks such as health monitoring, maintenance, your pod is being restored if there's a failure so your when you deploy your cluster things like your nodes and your humanity master they are deployed and they're configured for you so yeah i mentioned earlier that one way to publish or deploy your app is by using a container registry so we have what is called azure container registry it's a private docker registry in azure and you can use it to store and manage your docker container images also it's to store related artifacts and one way to use azure registry or a way to use azure container registry is by pushing your image to the registry using docker commands so we have docker commands i can use to push your image to the registry you can pull from a registry you can run anime from a registry you can also deploy to your humanity poster so here's the workflow and this is how typically like deploy your app i am used from just a basic normal app here and i mean it's you can run your primary azure kubernetes so we have a web app here which speaks to an api application this um like a regular front end speaks to an api comes to be like a web application speaks to an external api and then the api speaks to a database application which in turn i mean communicates with azure xql database so what happens is as you can see um these two applications are moved to the azure container registry but before they are moved to the azure container registry what happens is they have to be a docker image so just if you have to um um containerize these applications and then when they are containerized you move it to or you push it to your azure container registry and then when your image is confirmed to be your azure container registry you deploy it to um the kubernetes cluster and you can run your app from azure kubernetes so yeah um these steps just basically expansion the diagram dimension that i showed earlier so um let me create your app um create a docker image from your app containerize your image containerize your app pardon me then you create an azure container registry to push your image to the azure container registry you create a kubernetes cluster and you also create your manifest files and you deploy and run your app so i just want to go right into um looking at the requirements so here are some the tools that will be required for this demo um docker then i'm going to be using an id i'm going to be using visha studio pool so you can use visha studio code as well it's fine then um azure cli can be installed on your um pc so you can use azure cli from a terminal or you can use the cli on portado azure so either way then i'm going to be using the qctl for um to run my kubernetes commands so yeah um we'll go to the demo now okay so i'm going to be creating my app right now so um um my docker app i'm going to create an nvc app so here and it was called africa so here my app is being created right now and to be up okay um i did it was supposed to like trust the certificate but let's just go ahead okay so um i'm going to navigate to the app folder now so africa cv and then i'm going to um restore the visha it's going to take a second certificate restore them i mean i can run view or run browser i'm just going to do um the next one okay yep so app is running so we can't go ahead to confirm this um on our browser so it's running on looker so because they had to copy that um open up our browser um yep our app is off i'm sure and then we can go ahead to um and we shut down the app okay so let's go ahead to open our app from our id so i think we just to do put our app is in the man's and yep it's open here so sorry about this yeah so this is our app basically um we have our views our modules and our controllers so what we are going to do next is um for you know um containerize our app thus make an app into a docker image so let's go back to terminal and then all we just have to do is um we can do from here from terminal here or from terminal on the id so then just a from here so just first of all i need to purchase the app so that's the net purchase the app to be published okay our app is being published so next stop um we're going to um create the docker file so let's just go ahead put it up okay so we can see that um our docker file has been created so let's just go ahead um so because i've done this before i'll just go ahead to um copy what i have here copy all i just have to okay so i've gone i had to copy what i have before so just make some adjustments many people do that um our dll is from the africa pc which is what we have done here so typically so what this does is the um we are selecting 5.0 sdk of asu.net and then we are copying our published app into this folder um this working directory app then we are telling the docker that we should use app as the working directory and then the entry point is um dot net app.pcd.dll which is like an executive command so next up is um let's just create um another called um docker ignore so now docker ignore um we're just going to ignore um so yeah so um what i'm going to do next is now i'm going to build our image so i'm going to try and use the terminal but let's just go back to our terminal here so we're going to be doing docker build so let's call this um let's just specify now that that's well created so it's going to go ahead and show our image screen right now and yep our image is done using so as you can see um our command from asp.net.sdk to copying from here to here selecting app as a working directory and then here our um image has been used so as you can see we have an image here that contains our app too um you can check the list of images that you had before um so this here's the last one we just ran 46 seconds ago so well good so let's go ahead to create our container so we have um docker with name of our container the name of our image which is this so yeah we get back our container it so we can run the docker command to get the list of all our containers so yeah it is somehow like oh it's all our containers so it is rotated 10 seconds ago so we can try to start our container so let's use the docker start of our container for sample the cd container it's been started okay so we're not going to run our image so let's do docker run um let's just push it to the container and it's then we're going to call another image this is something here cd container image so yeah our app is running on docker it's so i'm going to check our browser so yeah um just run our image from docker so um going back to our terminal now what we're supposed to next is push our image to azure container registry so so far i do that we have to create a research group in azure sterilize so i mean can you just command to create it you have to create a research group from your portal to azure who have created one before so i'm just going to use the one that i created so we're going to be creating our registry now let's create a registry in azure sterilize so here create your research group like i said um i already have a research group i haven't been creating one yet so first of all we're just going to run our registry so yeah it's open right now so um we're going to have access to the instance we have to log in registry because we're going to just go ahead and push our container so um before we push our image to the registry and then before we touch the image we have to get the log in server for our container instance let's just um try to get the server for that so i'll just like this and go ahead and find the server to register our server which is ready to push in our image now to docker image to find our image again let's start go ahead and start our image so it's a name of our server found over here so we'll just go ahead and start our server and then we are tagging our dumping image as we're done with that now the next step is to push our image to our container registry that's just put there so all of us can go ahead and just go ahead and push acr server goes and register so just like i said even as we come to our registry we can pull it as well let's just go on my image that's typically been pulled then we can do a lot of things we can verify our tag so let's go ahead to um create a parameter cluster we can't wait to using um the address here like but i'll just yeah go to the azure portal for that so this is the azure portal you see um tivamete service actually um created one before the service so i have one so i have a cluster before the then you can create another cluster okay so i'm just gonna go ahead to choose my research group um and then call my cluster kcd then i want to pick so initializing um deployments submitting deployments and yep cluster is being deployed deployments in progress so i just kind of hold on a bit for that you'll see it's been created for waiting for people who can't hold on while we're all done on the plan as well check out our container registry the ud registry that we created because it is well created acd registry let's check it out all created um before so if you go to repositories here you should see the image that we created so here this one here sample kcd then you should click on that you'll see our tags everyone basically yeah okay so our deployment is done and you can see we're able to create our cluster so um let's just go ahead to download our cluster configuration for kcd so we're going to be referencing our research group resource then the name of our cluster is kcd yep so we've downloaded our cluster configuration for kipctl so next is um we verify our kipctl content so you did that by running kipctl config but here put in our context so what we created was kcd then it's here so good so we can only get our notes to here get notes acs has done that for us so we can go ahead to get our notes so yep we have our notes ready so we cannot go ahead to create our manifest files our kibanaetis deployment manifest files so um let's just go ahead to create so now go back to our id to create that so what we do is um we do let's create a pod and let's create a service so the smallest unit of work in kibanaetis is called the pod and going back to our id now so i'm just going to show you this and show you what we have in our format code then i just give you like the appropriate name so i'm just i'm going to name this app africa kcd app our image is on docker images here's our image when we are ready to place that and then yes run and so be exposed on port 18 then our service and we're gonna have to copy what i've done before as well please don't copy it may make me sick just right it's from scratch so i'm just gonna copy the name of our app just for this and then um let's make our app on port five thousand three so i have all like i can't tell which of my ports is in which that's amazing this um ports so let's go back to our port so i can so like explain what's going on here so you can see we have labels here so what labels does is they are basically like key values that attach to kibanaetis objects so they are basically like used to identify the attributes of the object and and i mean just is for organizing subset of objects so spec may describe the properties of the port as you can see we're referencing our image and then like what's our image our image is a web page and then my instruction kibanaetis a net of traffic um it's on port 18 so the reason for this service is because we're trying to expose kibanaetis and cluster wide externally so that's why we created this service final which is referencing which is referencing our um port so you see the container port is on 80 and then this is the target port 80 but then like our app will be on exclude on 5000 app 3 and then we're also specifying elude banasa here so let's just go ahead to apply our changes we have to apply um so let's just go ahead to apply our manifest port in kibanaetis 10 we're going to do q ctl apply the port that is just um we're applying the port so see it's been created and then go ahead to apply our service service because yamiwan it's been created so what we just have to do now is we don't know watch our services to see if they are up or not you see watch so as you can see our app is up this is the name of our port type it's elude balancer this is the post type and this is external ip you can access it on and this is the port so let's just now go ahead and boot our browser yes our app is running from aks so thank you so much for listening here's my twitter handle and if you have any questions as this was your recording plan drop it in the chat i will be listening in and i would love to answer questions thank you