Azure AKS : Integrating ACR with AKS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the azure kubernetes service series IKS series and today we are going to connect or integrate our aks with a CR in industries you must have seen in the previous videos where we talked about a CR created the demonstration same goes with the aks so right now what we'll do we'll integrate the ACR with our aks means whenever we do a deployment in the Q&A DS in agile community services it will pull the images from the ACR if you do it directly it will not of course there is some kind of authentication is required and there are multiple ways you can do it we are going to perform with the help of azure ad so that you need not to do anything inside the cube in this cluster and you need not to create anything any kind of secret it's this is the feature of a show itself and let's do it so let me take you through the environment first this is our ACR as you can see the name is ACR aks 2020 and we have the we enable the admin user right here and if I click here you'll see I'm on standard you can you can choose basic as well and under repository I have a single hello world image that this demonstration we have already covered in our previous video so let's go to aks let me take you to a KS cluster name is Q okay and we have single node running here so let me open my okay right here to get the credentials humor lady's credentials you know you need to run a Z aks get credentials resource group and name of your cluster we have covered all those things in our previous videos so here if I if I run Q cuddle get part there is no pots and if I do get nodes we have only one node running okay now in our ACR we I showed you and repository we have single image now let's try to pull this image to run power inside our a cache okay this is the task that we have so let's do cube cuddle all right I know it is going to be deprecated soon but just for the demonstration let me give it a name and image equal to AC our aks 20/20 but if your e r dot io / hello world ocean one let me check this out another world version one and that's the actual SIA dot IO is you are a case that is free right here under access keys you can see your login server name your repository name okay so where were we right here okay so let's see if it tries to pull this image and create power out of it right okay let's do it it says created that means deployment is getting created you can see deployment apps /h doubly created so if we do cube cuddle get deployment we would have one deployment in place but as you can see under ready there is zero out of one we should have one out of one it doesn't take that long to create a simple container of hello world right so let me do this cube cuddle get pause and there is an error on status and image poll means or aqueous cluster is unable to pull the image from the ACR because there is no integration because ACR is not allowing aks to get in and pull the image so we need to do some kind of integration some kind of authentication is needed so we are not going to do anything inside the is aks cluster we are going to utilize the functionality of a Shore and Azure ad okay so this is what we are doing when we have a CR created already a KS created already means we are integrating when both the resources been created we can also create with the integration from the beginning you know so let's go ahead and integrate this it's a very simple command that can help you this it is easy IKS update okay update what cluster q+ tree where it resides it resides in AC r RG okay what you want to update we want to attach we want to attach what you want to attach you on to tat a CR okay what is the name of a a CR it's a CR a KS 20/20 that's what I want to attach okay now if I hit enter it will start running it will start adding a rule if I have not messed with any kind of spelling or things like that it's easy yeah you see ad roll propagation done the back end it creates that for you okay if utilize the functionality of your 80 and it gives you enough right so that you can a one resource of the azure can talk to the another resource of a shore okay so let's wait while it's running and then we'll try to perform the demonstration we'll try to pull the image hello world or will create one more deployment just to be sure if things are working okay alright it took a while but now you see right here we're in the command right here it start adding the role and that huge output we got okay now our eks has the access to the ACR and if we run the same command that we were running before cube cattle run hello world or HW image from our ACR aks 20/20 it should work it says error okay already exist because we have not deleted that one alright don't worry let me call it too so that we would also know how many things or how many tries we have done so it says created again we way it could be your deployment so let's do get deployment it says one out of zero it's just a 13-second maybe we are okay or maybe not let's see Q God o get pods it says completed so we're good it's just a hello world you know that's why it didn't do anything you see it's running it's doing hello world it's going closed it runs to hello world it getting closed that's what it is happening you can see its again completed if we keep on what it's again completed so hello well it's it is it's just for demonstration like it is pulling you can see it's not getting the error image anymore okay so just to prove a point let me get it out of here or let me delete this deployment both the deployment we don't need this deployment anymore and you can delete it like this H that's my body we don't want to leave the part but the entire deployment HW + HW - it will delete both the deployments and now let's quickly import image that we can utilize for aks deployment the deployment which would help us to understand it better okay so let's quickly run this command AZ ACR import okay what we are importing first in our ACR registry so we gotta provide the name 2020 and then from where we are importing we're importing from dhaka dot io okay if you wanna get through these commands wanna save it you can save it or I'll share the link of Microsoft documentation you'll find all those comments there okay and geniux is the wonderful image to do the testing like these wouldn't let your container getting completed it will keep on running it's a web server right so we are giving it nginx version one okay this is our command we are importing and Jake's latest image and we are importing it in a CR as nginx version one okay and once it is you know imported we can check that and use that to run the deployment in a cache okay so let's see alright it's it's done so what can we do we can go ahead and check our repository or we can list our repository repository if I'm not missing messing with my spelling list what is the name of our ACR it's ACR aks 2020 and we won't put in a table fall that's how we can check from here and if you want to check it you see hello world and nginx we've got two images here if you go here under the repositories if you refresh you find both the images right here let's get back and now let's create one folder mkdir I guess CD aks we on this folder where we are going to put the Yama file which will be getting the information from our you know image from the ACR will use the same tagging but it will be running the nginx and we call it in the next appointment okay so we need to do VI ACR aks okay and I'm going to okay let me do this all right let me do this okay insert and paste no paste so this is the API version one deployment this is the this is the metadata these are the labels engine X 0 and here the image that I was talking about it is going to our ACR okay it's a very basic mo file and if you want to perform this demonstration I'll share the [Music] documentation Emma's documentation link in the description box you can utilize the same one same Yama file to perform your demonstration okay now hence we have saved here now we can do cube kernel a cube CTL apply you see it is dot Yama okay it says deployment created very good let's do cube cuddle get pods - w-well no need it's already running you see both the because we said replicas - so both nginx deployment are running you can see okay it's running its keep on running see if you do a game it will bring it will not be completed the point is it was able to pull the image from the ACR without any issue there is no error with the image so it is integrated and it is proved hence proved right so that's how you can integrate your ACR with aks without even doing any kind of you know anything any you will not create anything inside the cluster you will not touch the cluster it will be taken care by the edge already totally okay now that's how we do it and that's all about this video and next video we'll try to create both together rather than attaching it later on or once it is attached you can also detach with the same command you need to just run the same command by which we have attached and instead of attach you can simply use detach various that come on okay let me show you or we can write it again maybe it was simple easy aks update always remember we provide in a name of the cluster that was cube and then we provided the resource group there was a CR RG then instead of doing attach we do detach disintegrated detach okay and what you're detaching is he are and what is the name of a cra-cra KS 2020 okay if I enter you'll see the role that it has added it will be removing that role and see add role deletion done and now your ACR would not allow your aks to pull the images and you'll get back to the same issues at or pull image alright that's how you integrate and thank you for watching and you have a good day
Info
Channel: Pachehra Talks
Views: 2,031
Rating: undefined out of 5
Keywords: Azure, Azure Monitoring, Cloud, cloud computing, IaaS, Paas, Saas, AZ-300, Microsoft, Certification, Storage account, LRS, ZRS, GRS, RAGRS, Endpoint, Vnet, virtual network, network access, firewall, VM, disk, managed disk, unmanged disk, Azure AD, Active Directory, AD Connect, PIM, CA, ARM, ARM Templates, Region, VHD, routes, subnets, domains, portal, MFA, Backup, Azure LB, Traffic Manager, VPN gateway, application gateway, RBAC, App service, AKS, IAC, Terraform, DevOps, Source control, module
Id: 5Gw-GhLh4dQ
Channel Id: undefined
Length: 18min 38sec (1118 seconds)
Published: Wed May 27 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.