Deploy to Azure Kubernetes (AKS) from Azure DevOps with Azure Pipelines | Build LIVE with Me

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

Комментарии • 137

  • @Lou610
    @Lou610 3 года назад +2

    I just want to say thank you! You have simplified this whole process for me and I have been struggling to get a simple solution into AKS so again THANK YOU!!!!!!

    • @CoderDave
      @CoderDave  3 года назад +1

      Hey, happy to know that! And thanks to you for watching ☺️

    • @Lou610
      @Lou610 3 года назад

      @@CoderDave I just want to ask if we had to change the vmImage to windows-latest would it work? I keep getting a time out error. I need to prove to my manager that we can run this in windows container as well

    • @CoderDave
      @CoderDave  3 года назад +1

      The vmImage is the Azure Pipelines Agent the CI and CD steps are running on. As long as your application can be compiled in Windows (Docker can run on Windows Agents so it's ok), and you don't use any Linux-specific scripts in your CI/CD project (i.e. you don't use bash) then everything works the same.
      What timeout are you experiencing?

    • @Lou610
      @Lou610 3 года назад +1

      @@CoderDave So I fixed it was trying to deploy windows container on a linux only cluster so was a bit of a blonde moment for me. So our requirements changed and I can't find any well explained examples of the following. You have 3 name spaces Dev, QA and Prod how would I deploy to all 3 name spaces in one pipeline? Sorry for asking so many questions I am really new to Azure and Azure Kubernetes

    • @CoderDave
      @CoderDave  3 года назад +1

      No worries, I'm here to (try and) help :) It is fairly hard to have this kind of Q&A here on the YT comments... do you mind joining the Discord server (link in every video description)? it is a far better place for discussing and collaborating :)

  • @brikimbran
    @brikimbran Год назад +1

    Amazing stuff. Thank you for this hands-on intermediate level walkthrough. Cheers all the way from Kenya!!

    • @CoderDave
      @CoderDave  Год назад

      Glad you enjoyed it! Thanks

  • @suhasjvrundavan3614
    @suhasjvrundavan3614 9 месяцев назад +1

    it was a wonderful session dave thank you for this tutorial from INDIA

    • @CoderDave
      @CoderDave  9 месяцев назад +1

      My pleasure!

  • @vishnukumarksd
    @vishnukumarksd Год назад +1

    Worth watching content. It really helps to build a complete pipeline from dockerize to k8s deployment

    • @CoderDave
      @CoderDave  Год назад

      Thanks, glad it's helpful

  • @akshuvedhu1254
    @akshuvedhu1254 8 месяцев назад +1

    Thank you for this elaborate session Dave! I was able to deploy But the web application is not loading . what can i check to fix this ..

    • @CoderDave
      @CoderDave  8 месяцев назад

      Welcome! Well, it is really hard to say what the problem is. I would recommend checking the logs in the pod

  • @sharatbhaskar8001
    @sharatbhaskar8001 Год назад

    The best video on Azure Devops CI CD pipeline for AKS. Thank you so much for this great content.
    I have few doubts which I wanted to clear:
    1. Will pipeline automatically create the secret 'k8sexamplesacrauth' and k8s will use it to communicate with the ACR?
    2. While creating the k8sdev env. we did not create any service connection, which service connection will it use then? The one which we created in the project setting by default? I am asking this as you removed the serviceconnection at 39:59.
    3. Should we not specify the image pull secret in the box on the right pane. Time is 24:55
    4. Now while adding the other stages like QA, UAT and Prod do we need to again add these 2 tasks i.e. Downloading pipeline artefacts, creating the secret to pull the image?

  • @PHRAKENDARK
    @PHRAKENDARK Год назад +1

    nice video , please can be update the video because the conection not working new policies "could not find any secrets associated with the service account."

    • @CoderDave
      @CoderDave  Год назад

      Where are you seeing that error? The video is from a while ago, perhaps something changed in the meantime 🤔

  • @sohlae
    @sohlae 9 месяцев назад +1

    Hi Dave, thank you for this video. I have a question. What if I want to run unit tests and publish the results in the pipeline summary?

    • @CoderDave
      @CoderDave  9 месяцев назад

      Glad you liked it. If you want to run unit tests and publish the results, the best approach is to use a pre-built test-specific task (for example - task: VSTest@2 for VSTest, and many other exist for different kind of test)

    • @sohlae
      @sohlae 9 месяцев назад

      ​@@CoderDave, does this mean that it is better practice to do the unit tests outside the Dockerfile?

    • @CoderDave
      @CoderDave  9 месяцев назад

      not necessarily a better practice, but it depends on your goal. Some unit tests can publish the result to the pipeline automatically even if run in containers (like VSTest or NUnit). Other frameworks/technologies cannot do that, so if you wanna have the output in the pipeline you have to use "external" tests

    • @sohlae
      @sohlae 9 месяцев назад

      ​@@CoderDave, understood. Thank you!

  • @navyabhanuchaganti6718
    @navyabhanuchaganti6718 2 года назад

    very clear step by step procedure to deploy aks

  • @MuhammadZahid-nr1zu
    @MuhammadZahid-nr1zu 9 месяцев назад

    Very much helpful. Thanks Dave.

    • @CoderDave
      @CoderDave  9 месяцев назад

      Happy it was helpful

  • @learnatcloudanalytics
    @learnatcloudanalytics 2 года назад +1

    Thanks for the session. I would like to know how to configure tableau server on aks.

    • @CoderDave
      @CoderDave  2 года назад

      Hey. To be honest I've never used Tableau :(

  • @sekarcse
    @sekarcse 2 года назад +1

    Thanks for such a nice session Dave. I am new to Azure and I will give a try to push the sample app to AKS. If you add a video for ingress also would be great

    • @CoderDave
      @CoderDave  2 года назад

      Great, let me know how it goes

  • @saisivakiran8467
    @saisivakiran8467 10 месяцев назад

    How to we get the build number dynamically in our manifest as said its complex to implement, anu idea on this?

  • @adamzachary6947
    @adamzachary6947 2 года назад +1

    Also in minute 16:25ish. you said you will change the image from build to build and push! actually this option is available from the very beginning! instead of choosing docker build! you could've chosen Docker build and push! so people don't get confuse.

    • @CoderDave
      @CoderDave  2 года назад

      As I've mentioned multiple times during the video, I know that many things could have been done differently... like for example using the "proper" template with multiple steps from the very beginning... but, again as I've mentioned, I decided to take the step-by-step approach so everyone, even less experienced people, can follow along and, most importantly, understand exactly what was going on at any single step

  • @NeerajVerma-wb3qu
    @NeerajVerma-wb3qu 3 года назад +1

    Excellent session

  • @rakhipatil2321
    @rakhipatil2321 Год назад

    do you have a link where you have created AKS cluster, ACR in azure portal and also the service connection

  • @mohamedabdalhady3163
    @mohamedabdalhady3163 Год назад

    thank you for your explanation. but i have a question i need to use an environment with an on-prime private cluster can i achieve that?

  • @zoltanvarga5393
    @zoltanvarga5393 2 года назад +1

    Thanks for the nice video!
    I have one question regarding the removal of the service connection at 39:59. Would it make sense to remove the namespace as well from the input sections of these 2 tasks? Since in your k8sdev environment the namespace (default) is already defined, I would think so, but I'd like to hear your opinion about it. Thank you!
    Greetings from Hungary!

    • @CoderDave
      @CoderDave  2 года назад

      Hey there, sorry for the late reply. Good catch, yes I'd say that 99% of the time you probably want to remove it from there. Sometimes you may want to keep it to override the default namespace in the Service connection (so you don't have to create one for each namesapce)

  • @chetanesque158
    @chetanesque158 5 месяцев назад +1

    Good content, well presented.
    Very useful to me :)
    ~ a recent subscriber

    • @CoderDave
      @CoderDave  4 месяца назад

      Awesome, thank you!

  • @NikhilJadhav-p7k
    @NikhilJadhav-p7k 10 месяцев назад

    Hey Dave... we need more such videos of project deployments.

    • @CoderDave
      @CoderDave  10 месяцев назад +1

      I have a few things planned 😀 haven’t been able to post videos lawyerly but that should be about to change

  • @majedalthobyani5457
    @majedalthobyani5457 2 года назад +1

    Replace token is depreciated and substituted with file transform task. how can I use this task to replace image tag?

    • @CoderDave
      @CoderDave  2 года назад

      That tasks apparently is intended for web packages and requires a web package file, and does not work on standalone json files.
      You could use some 3rd party task like this: github.com/qetza/vsts-replacetokens-task

  • @mkrishnacharan
    @mkrishnacharan 3 года назад

    Really appreciate your effort. Cool demo

  • @CoderDave
    @CoderDave  3 года назад +1

    ✨ Question of the day ✨:Any other question related to deploying to AKS from Azure DevOps that I haven't covered?
    🆘 NEED HELP? 🆘
    Book a 1:1 Consultation with CoderDave: geni.us/cdconsult
    We can talk about GitHub, Azure DevOps, or any other DevOps tool or project you need help with!
    🙏🏻SUPPORT THE CHANNEL🙏🏻
    Buy me a coffee: www.buymeacoffee.com/CoderDave
    PayPal me donation: paypal.me/dabenveg

    • @lovelysharma5825
      @lovelysharma5825 2 года назад +1

      Can you cover blue green deployment to aks

    • @CoderDave
      @CoderDave  2 года назад

      Good one, thanks! Let me see what I can do 🙂

  • @aakritimahajan3489
    @aakritimahajan3489 2 года назад

    I noticed the github repo has imagePullSecrets in the Kubernetes deploy step, was that just a step that was missed in the video, or is not necessary to have in the Kubernetes deploy step?

  • @animal9470
    @animal9470 9 месяцев назад +1

    Really wish you did it as helm

    • @CoderDave
      @CoderDave  8 месяцев назад

      Maybe an idea for the next one :)

  • @IgnoreMyChan
    @IgnoreMyChan Год назад +2

    YAML is amazing. It REQUIRES you to have some OCD, which I have and I love 🙂

    • @CoderDave
      @CoderDave  Год назад +2

      I think this is the first time in my life I've heard someone saying that "YAML is Amazing" 🤣

    • @IgnoreMyChan
      @IgnoreMyChan Год назад

      @@CoderDave Haha! Yeah, well, compared to the alternatives... JSON is too restrictive, XML is a disaster to write manually, INI lacks too many features. What else is there?

  • @ItsmeRajivS
    @ItsmeRajivS Год назад

    i didnt find release pipeline to deploy the application in aks

    • @CoderDave
      @CoderDave  Год назад

      The link is in the show notes, under "Resources"

    • @ItsmeRajivS
      @ItsmeRajivS Год назад

      @@CoderDave can we use only build pipeline for build and deploy?

  • @manishalankala1622
    @manishalankala1622 3 года назад

    Can you use serviceprincipal instead of create secret at 28:24(video)

    • @CoderDave
      @CoderDave  3 года назад

      if you refer to the secret for the acr ( 28:10 ) then that is just the name of the "Kubernetes Secret' (it's a type of object in k8s). We need the name to be included in the deployment, but the task grabs the Service Principal from the service connection and inject that into j8s using the "secret name" we specified

    • @08quiro
      @08quiro 2 года назад +1

      @@CoderDave about the secret (create Secret) task, can you instead of creating one each time that a pipeline runs just create and add it one time on your "deployment.yml" (imagePullSecrets)? Is that Ok, or why did you choose this method? thanks!

    • @CoderDave
      @CoderDave  2 года назад +1

      What you suggest is "technically" ok (which means that it would work), but I prefer creating/updating the secret at every deployment because it is more flexible. Should the secret change I only have to update it in the Service Connection of Azure DevOps and not in the YAML, and it could also be applied to multiple deployments

  • @jefferson5884
    @jefferson5884 Год назад +1

    Hi dave, could you please make a video about rewriteurl in azure web app. Thanks!

  • @Fran_Alcaraz
    @Fran_Alcaraz 2 года назад +1

    I have a question. If as a member of a team (in a company) I create service connections and environments with my personal work account but in 3 months i leave the company, would the pipelines still work?

    • @CoderDave
      @CoderDave  2 года назад +2

      Good question. Yes, it will still work because they are defined in the project, they are not tied to a specific user account.

  • @janodutoit
    @janodutoit 2 года назад +1

    Thanks for the great video - a lot of knowledge gained! Quick question - this seems to be a perfect pipeline for building and pushing changes to AKS in a Dev environment, but what would be the best approach to promoting either the artifacts to a QA -> Alpha -> Live ACR and subsequently the related AKS clusters? Would the best solution be to use releases, or is there some yaml approach? FYI - watching from South-Africa :-)

    • @CoderDave
      @CoderDave  2 года назад

      Thanks. While in YAML, I'd say do it in YAML :)
      The only reason why I'd consider using Release Pipelines is if you need to have things like Automated Gates (not supported in YAML) to gate your deployments. Otherwise go with YAML.
      I'd just have subsequent stages, with approval in place, to take the same image, push it to the next environment ACR, and then deploy it to AKS

  • @punitkumar1560
    @punitkumar1560 2 года назад +1

    Hii Dave love from india. I have question that if I use release pipeline then i have options of rollback to previous deployment . How can can i do in this .

    • @CoderDave
      @CoderDave  2 года назад

      👋 if you use YAML pipelines unfortunately there is not “out of the box” rollback. But Classic Release Pipelines allow you to add a “Rollback” section , which you can control also with conditions, that allows you to add your rollback steps

  • @jhonjairomoreno9804
    @jhonjairomoreno9804 2 года назад

    Thank you Dave, very very usefull!

    • @CoderDave
      @CoderDave  2 года назад

      Glad it was helpful!

  • @kingalok
    @kingalok 3 года назад +1

    Thanks for such a nice session Dave, Your all videos are excellent. I have one doubt here, why don't you use Helm Charts? In fact, we can publish/post the helm charts to ACR along with the image. And later in CD pipeline, we can use them. This way we have full control via versions of both app and docker image.
    Also can we use the self hosted containers for our agents ? Any tips to share, please. Thanks again for this brilliant video.

    • @CoderDave
      @CoderDave  3 года назад +1

      Thanks :) The reason why I don't use Helm charts is because I'm not a great fan of them. They can be useful in complex applications, no doubt about it. But for simpler applications I feel they introduce a level of complexity that could be more than the benefit they actually bring. Just my opinion, of course. :)
      What do you mean by "Self hosted containers for our agents"? Azure Pipelines agents can run in container (I actually have a video about this) and therefore you can run them in any cluster. I like to run them in k8s to be able to scale easily.
      PS: I will soon have a video about scaling Pipelines Agents dynamically based on the actual load... stay tuned ;)

  • @firaunic
    @firaunic 2 года назад

    Thanks Dave. One of the best teacher out there! I have a question, you used buildID to tag the image. Now if I have 2 separate pipelines for build and deploy then the buildId tag won't work as its different for both? Could you please suggest, how BuildID from first pipeline (that builds & publishes image) can be forwarded to release pipeline that just deploys the manifest to AKS? Thanks again for the brilliant work you do!

    • @CoderDave
      @CoderDave  2 года назад +1

      Hey, sorry for the late reply and thanks for the compliments :) About the BuildID...
      if the second pipeline (deploy) is triggered by the first pipeline (build), you can find its BuildID in the event payload that triggers the deploy.
      if it's not, the 2 pipelines are "independent", then the only choice you have is to use a "manual input" (parameter) in the pipeline to specify the tag of the image you want to deploy

  • @rajuch-q8d
    @rajuch-q8d 10 месяцев назад

    Hi This raju from india, can you explain open spurce kebernetes and AKS which is better now present ia m working as dotnet developer so i want move to devops side

  • @loctong2706
    @loctong2706 2 года назад

    Thanks for the great video

    • @CoderDave
      @CoderDave  2 года назад

      Very happy to know you found it helpful

  • @rohitdixit5787
    @rohitdixit5787 3 года назад

    Hi, this is really good information.
    I want to create a CD pipeline for image deployment in private cluster. Images are available in the ACR.
    I have a quick question, will it work in private cloud as well? How will service connection works with private cluster and ACR.?

    • @CoderDave
      @CoderDave  3 года назад +2

      Hi, thanks! Very happy you find it valuable.
      You can deploy to a private cluster (I assume this means inside a protected network, regardless if on Azure, on-prem, or anywhere else) and it would work in a very similar way... there are basically 2 ways to do it;
      1) you need to have a public endpoint on your cluster, reachable from internet, that AzDO can use to deploY (and this is the least optimal way, because it could have security implications), or
      2) you need to use Azure Pipelines self-hosted agents. Self-hosted agents reside in your own network, so they have access to your private cluster. They don't need a public endpoint because it is not Azure DevOps connecting to the agent, but it is the agent polling Azure DevOps for jobs... so you just need outbound internet connectivity, making this way safer
      Hope this helps :)

  • @AlexanderFarber
    @AlexanderFarber 2 года назад

    Great video, thank you

    • @CoderDave
      @CoderDave  2 года назад

      Thanks and happy to know you found it useful

  • @raghur5678
    @raghur5678 2 года назад

    thanks for the video

    • @CoderDave
      @CoderDave  2 года назад

      Happy you found it interesting

    • @raghur5678
      @raghur5678 Год назад

      I created a ServiceAcount with workload identity and assigned to userManagedIdenityKeyvalut.i have Federated Credentials ,seems to be good from my side ,but the error is coming.

  • @patrickizekor6463
    @patrickizekor6463 3 года назад

    Hi Dave, i'm new to devops and was was wondering how do i start my devops journey. Please which certifications do i start off with and probably any colleges that can provide the training. Thanks!

    • @CoderDave
      @CoderDave  3 года назад +1

      Hi, Certifications are much “easier” to get when you have hands-on experience with the platform/methodology. I see them as a "complement" to your experience, not as a starting point. Also, you don’t “need” one at the moment (unless it gives you credits against your college degree).
      My advice would be to gain as much as practical experience as you can while in college, and get your certification when your out of it. Remember that real experience beats certifications 😁 what I mean is that if you have real experience with something you can be good at it, but if you just have a certification you may or may not be good at it. In my opinion a certification should be the proverbial “cherry on the cake”, the cake being the hands on experience. Just my view of course 😁
      About college, I'm not sure about that... I have no experiences or connections in any country for that :)

    • @patrickizekor6463
      @patrickizekor6463 3 года назад +1

      @@CoderDave Thanks!

  • @mikealhayek298
    @mikealhayek298 2 года назад

    Thanks a lot for this video! This setup seems to be great for dev environment when you always want to publish the latest changes after every commit. How can one control publishing to production environment? I wouldn't want to publish to my production environment event time a commit happens on my branch. Thank you in advance for your feedback!

    • @CoderDave
      @CoderDave  2 года назад

      You could have deployment to Dev happening for every commit. And then setup approvals for the other environments so only the “releases” you want get deployed to QA/staging/prod or other env

    • @mikealhayek298
      @mikealhayek298 2 года назад +1

      @@CoderDave Thanks a lot for your quick feedback! I'll give that a shot!

  • @mohi29k
    @mohi29k 3 года назад

    Hi Dave,
    Thank you for sharing this video but i am facing following issue.
    ##[error]No manifest file(s) matching /home/vsts/work/1/manifests/deployment.yml /home/vsts/work/1/manifests/service.yml was found.
    please let me know what i am missing ?

    • @CoderDave
      @CoderDave  3 года назад

      Thanks ☺️ that error message means that either that your files have a different name than “service.yml” and “deployment.yml”, or the path is different when the artifact is extracted

    • @mohi29k
      @mohi29k 3 года назад

      @@CoderDave Thank you for your reply i have resolved the issue but the application is failing while deploying the job build got success but while deploying showing the time out exception

    • @CoderDave
      @CoderDave  3 года назад

      Probably some settings on your K8S cluster or something like that, debugging would require access to your environment :)
      Check the logs and see if anything is there

    • @sharmilabaskaran7347
      @sharmilabaskaran7347 Год назад

      Hi Srinivasa Rao, I have encountered the same error as you. Can you let me know how you rectified the no manifest files error please ?

  • @darkshine545452
    @darkshine545452 10 месяцев назад

    could you plz make a dedicated video on Private AKS cluster and it will be only accessible using vpn.

    • @CoderDave
      @CoderDave  10 месяцев назад

      I have a few things planned 😉 haven’t been able to post videos lawyerly but that should be about to change. Stay tuned

  • @chendrayanvenkatesan5286
    @chendrayanvenkatesan5286 3 года назад

    Brilliant - Nice Share!

  • @HenriqueSantos-ie2wc
    @HenriqueSantos-ie2wc 2 года назад

    Thanks! You're awesomeee

    • @CoderDave
      @CoderDave  2 года назад

      Thanks! All I do is for you guys 😊

  • @sankalpjain63
    @sankalpjain63 2 года назад

    my external ip is in pending state for the service

    • @CoderDave
      @CoderDave  2 года назад

      Make sure you have the right config for the deployment (i.e. LoadBalancer), and that your AKS cluster is exposed

    • @sankalpjain63
      @sankalpjain63 2 года назад

      @@CoderDave can you make a video on azure bastion to connect with private v net

  • @vinnipatilpatil
    @vinnipatilpatil Год назад

    Please make complete video from scatch

    • @CoderDave
      @CoderDave  Год назад

      Isn’t this, literally, a complete video? 😅

  • @rajkumar.selvaraj
    @rajkumar.selvaraj 2 года назад

    thanks

  • @adamzachary6947
    @adamzachary6947 2 года назад

    You didn't specify how to create a service connection to private AKS! you in minute 12:50 you say you can switch between these to create kubernetes service connection! Actually using subscription service connection to private aks don't work! as devops a public service and AKS is private! the only way worked for me is using kubeconfig!

    • @CoderDave
      @CoderDave  2 года назад

      There are different ways to deal with Private AKS clusters, and you're right... kubeconfig is probably the most used one. I was trying to keep the example easy to follow and understand, and public clusters is what most people use, especially for learning purposes (unless in corporate environments)

  • @lourdhsagar
    @lourdhsagar 2 года назад

    Thanks .....

  • @scottstensland
    @scottstensland 2 года назад

    starts at ruclips.net/video/4Oa5HneTuKs/видео.html

  • @tottiegod8021
    @tottiegod8021 2 года назад

    You rock!

  • @ThomasPoth
    @ThomasPoth 2 года назад

    Great!

  • @rajujanagani3643
    @rajujanagani3643 2 года назад +1

    From india

  • @PORACICOM
    @PORACICOM Год назад +1

    Yasir from pakistan

  • @khalilennili6631
    @khalilennili6631 2 года назад +1

    Morroco

  • @kiransai6199
    @kiransai6199 2 года назад +1

    Hi code dave
    when i execute the pipeline using your code getting this error can you help me with this
    service/sampleapp unchanged
    /usr/local/bin/kubectl rollout status Deployment/sampleapp --namespace default
    error: deployment "sampleapp" exceeded its progress deadline
    ##[error]Error: error: deployment "sampleapp" exceeded its progress deadline
    /usr/local/bin/kubectl describe Deployment sampleapp --namespace default

    • @CoderDave
      @CoderDave  2 года назад

      Hye. That unfortunately is a very generic error message, which just means that the deployment took too long and it has been aborted. You should check the cluster, and see the logs and or kubectl describe the resources to see what did actually go wrong.

  • @mohamedabdalhady3163
    @mohamedabdalhady3163 Год назад

    thank you for your explanation. but i have a question i need to use an environment with an on-prime private cluster can i achieve that?