Deploy Docker image to Kubernetes Cluster | CI-CD for Azure Kubernetes Service

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • Learn how to configure CI/CD pipelines to automatically push a docker image to Kubernetes cluster abstracted by Azure Kubernetes Services (AKS).
    Learn how to pull a docker image from a public container registry, deploy your application to the docker image then push the image to a private container registry to get ready to be picked up by the release pipeline.
    What will be covered in this video:
    • Create Kubernetes cluster using Azure cli
    • Create an Azure Container Registry (ACR), AKS and Azure SQL server
    • Provision the Azure DevOps Team Project with a sample .NET Core application
    • Configure application and database deployment, using Continuous Deployment (CD) in the Azure DevOps using Azure Pipelines
    • Initiate the build to automatically deploy the application to Docker image, push the image to private Azure registry.
    • Automatically trigger release pipeline to pull the docker image and push it to Kubernetes cluster
    Main steps:
    • Get the latest version of Kubernetes cluster so we can deploy it to Azure Kubernetes cluster
    • Setting up the environment: Here we will configure three Azure resources namely Azure container registry, AKS, and Azure SQL server.
    • Configure Build and Release pipeline: we will manually map Azure resources such as AKS and Azure Container Registry to the build and release definitions
    • Trigger a Build and deploy application: Trigger a build manually and upon completion, an automatic deployment of the application will be triggered.
    • Access the Kubernetes web dashboard in Azure Kubernetes Service (AKS): A short note on web dashboard in Azure Kubernetes that assists basic management operations.
    Key Advantages of Azure Kubernetes Services (AKS)
    • Hosts your Kubernetes environment.
    • Quick and easy to deploy
    • Hosted control plane
    • Manages containerized applications without container orchestration expertise.
    • Eliminates burden of ongoing operations and maintenance by provisioning, upgrading, and scaling resources on demand while keeping the application online.
    • Continuous build option that creates Docker images for faster deployments and reliability.
    • Create resources and infrastructure inside the Azure Kubernetes cluster through Deployments and services manifest files.
    Useful links:
    --------------------
    Learning Git
    • Mastering Git From Beg...
    Learning Docker
    • Docker For Beginners S...
    Learning DevOps
    • Introduction and High ...
    About the Author
    ----------------------------
    Video:
    • Mohamed Radwan is a Pr...
    Blog:
    mohamedradwan.com
    Linked-in
    / mohamedahmedradwan
    GitHub
    github.com/MohamedRadwan-DevOps
    Twitter:
    / mradwan06
    #docker #Azure_Kubernetes_Services #Kubernetes #Kubernetes_cluster #Azure_Container_Registry #DevOps #CICD_Pipelines_Kubernetes
  • Věda a technologie

Komentáře • 102

  • @mariat.benson9905
    @mariat.benson9905 Před 5 lety +3

    I was searching answer who can explain Azure Kubernetes , you did it. Thank you. This saves lot of times for technical mergers.

  • @kokkimandy4943
    @kokkimandy4943 Před 3 lety +1

    Awesome video about AKS. Thank you so much for the effort 🙂

  • @dontdisturb100
    @dontdisturb100 Před 3 lety +5

    Awesome video even after 2 years of post :)

  • @PratikKamble1998
    @PratikKamble1998 Před 4 lety +1

    Excellent video, thanks so much for sharing!

  • @GandikotaSaikoushik
    @GandikotaSaikoushik Před 4 lety +1

    Radwan! Thanks a lot, man... Waiting from a long time like this video
    You have cleared all gaps and doubts what I have in deploying app using aks

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety +1

      Thanks Gandikota, happy it helpsyou.Thanks also for your kindly comment!

  • @manucloudlearning2474
    @manucloudlearning2474 Před 4 lety +1

    Very useful, Thank you

  • @poojachourasia562
    @poojachourasia562 Před 4 lety +1

    Really helped!! Thanks for sharing this video 😊

  • @amitkulkarni1712
    @amitkulkarni1712 Před 3 lety +2

    Fantastic video .. Really appreciate your efforts in making the video & helping the community .

  • @lifechamp007
    @lifechamp007 Před 2 lety

    Super helpful - Thank you so much Redwan !! #StayBlessednHappy

  • @jnayehsirine6222
    @jnayehsirine6222 Před rokem

    Great content ! keep the good work

  • @sahilmujawar5901
    @sahilmujawar5901 Před 2 lety

    Thanks you so much for this video

  • @ceciliatewksbury9158
    @ceciliatewksbury9158 Před 5 lety +1

    Thank you So much sir, ....Also could you please add more docker related videos ..Please keep it up.

  • @joysarkar81
    @joysarkar81 Před 3 lety +1

    Awesome...thank you Mohamed

  • @sakthijeganathan9573
    @sakthijeganathan9573 Před 4 měsíci

    Thank you!

  • @vchintad
    @vchintad Před 3 lety +1

    Very well explained Video. Thanks for all your knowledge sharing initiatives.

  • @ravitejapalivela2958
    @ravitejapalivela2958 Před 3 lety +1

    Mohamed, Thank you so much :-)

  • @johnhart6320
    @johnhart6320 Před 3 lety +1

    GOOD STUFF HERE!!

  • @ananthmaddur1200
    @ananthmaddur1200 Před 3 lety

    Superb and Excellent.

  • @raphaelfakhri3874
    @raphaelfakhri3874 Před rokem

    i am lovin' it

  • @dxhelios7902
    @dxhelios7902 Před 5 lety +1

    Mohamed, this is what I needed. Thaaaank you! You made a small mistake when changing configuration variables - you left Y letter on the front.

    • @MRadwanMSF
      @MRadwanMSF  Před 5 lety +4

      No problem, yes, I know about it. many people notice this error, this is why what you see in the video is after long work and repeated many times ....You see the happy path not the hard one :-)

  • @Nafiganado
    @Nafiganado Před 4 lety +1

    Hi, thank you for the demo! I am completely new to this topic. But I wonder how much the whole solution would differ, if our requirement is: "multiple ON-PREMISE client systems" and sole "Oracle DB 12c"? Azure cloud is used only as a source code storage. Can we still use AKS or it's for Azure cloud-based client systems deployment? What about DBMS, does it matter it's not MS SQL Server? Since "Kubernetes" itself is for free - can I avoid using "Kubernetes Azure Service" and do the same things (CI/CD deployment using Docker+Kubernetes) by using free tools?

  • @masoodsaiyed5041
    @masoodsaiyed5041 Před 7 měsíci

    Thank you for the detailed steps. I was able to follow and deploy an app. However mhc-front pod is going into Crashloopback off state. Is the MHC application code still up to date or need any changes..

  • @jamalchachil5899
    @jamalchachil5899 Před 2 lety

    HI Mohammed , thanks so much for this video :)
    I have a question: when I launched run of release pipeline at the beginning I choose ubuntu 16.4 , I had this error message (The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.)
    .what is the solution for this problem ?
    Thanks

  • @venky76v
    @venky76v Před 4 lety +2

    Thanks Radwan. Brilliant tutorial. Takes us through all the steps. I am getting an error when following through the steps on the release task when the Execute Azure SQL DacpacTask runs. By default, when I go into the Release pipeline, when I was asked to select a agent, I selected a Linux based Ubuntu agent and looks like this task needs a Windows agent?

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety +1

      Thanks Venky, I am very happy you like it.
      Yes, Dacpack needs Visual Studio which means it required Windows OS

  • @charushridhar3558
    @charushridhar3558 Před 2 lety

    While populating Service Principal ID in CLIENT_ID variable, "msi" is getting populated, is there any additional step involved for creating service Principal for AKS?

  • @thareus20
    @thareus20 Před rokem

    Any idea how we could run the pipeline on a locally hosted agent?
    I successfully created the agent and ran the pipeline up to the Run Services Task. After that it failed on the docker-compose. Not sure what went wrong, if anyone has ideas i would gladly hear them.

  • @hussainzulfiquar1505
    @hussainzulfiquar1505 Před 2 lety

    Great

  • @thareus20
    @thareus20 Před rokem

    As of 2023, an error pops up when trying to create the Azure Kubernetes Service for westeurope region on Trial Account. It requires a quota increase on total regional vCPUs, however, this request for quota increase is not granted. Any ideas on how to get past this, or just upgrade to standard account?
    EDIT: if the same command fails when creating the aks within your resource group, simple add --node-count 2 at the end of your input, this will only trigger 2 cores.
    Thanks to a person who commented 2 years ago, this fix worked for me.

  • @Manisood001
    @Manisood001 Před 2 lety

    do i need only one container registry service for all enviorments(dev,int,prod).i.e 1 acr for all enviroemnts

  • @moha1hemdan
    @moha1hemdan Před 4 měsíci

    thnx Radwan

  • @DannyRBennett
    @DannyRBennett Před 4 lety +2

    Thanks a lot Mohamed! We are just migrating to Azure so this was perfect for me. Great job... just want to point out I needed to add access for the pods to the sql server firewall. Maybe I missed a step? ;) Regardless.. thanks again...

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety

      Thanks Danny! really appreciate your comment!

  • @motazal-zoubi8470
    @motazal-zoubi8470 Před 4 lety +1

    Thank you very much, it is very helpful,
    we are planning to use cloud however we are afraid from the cost, is there any way that could help us estimate the cost before going cloud or is there any way to figure out which cloud provider (AWS or Azure) will be more cost efficient, any suggestion that could guide us?
    again thank you very much

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety +2

      I am happy it helps. Thanks Motaz
      For Azure, you can use Azure calculator to estimate the cost but I don't know for AWS
      azure.microsoft.com/en-gb/pricing/calculator/

  • @Nzaonline
    @Nzaonline Před 4 lety +1

    Excellent tutorial - In a real world of work - the auto demo generator AKS template wouldn't be there, so I take it I would have to create all the tasks from scratch emulating the AKS template generated? Also with regards to the AKS yaml file, can I use the same structure and tweak it for future developments?

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety +1

      Thanks!
      Yes, you will need to do everything but you can use yaml file as template or even search for other templates, you will find many

  • @BadSanta514
    @BadSanta514 Před 11 měsíci +1

    Timecode:
    1. Demo explanation begins at 12-10
    2. Demo starts at 16-35

  • @ivanvincent7534
    @ivanvincent7534 Před 2 lety

    Thanks for your video. What is the cost of having this demo running for a month in azure?

  • @hariomjain7926
    @hariomjain7926 Před 3 lety +1

    awesome

  • @prasadp337
    @prasadp337 Před 4 lety +1

    Thanks a lot for this nice session. Is there a specific Devops training provided by you? I'm interested . Please let me know

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety

      Thank you! I am happy it helps.
      All my training available in private, you can contact me using my blog
      mohamedradwan.com/about/
      For now, you can look on the following videos which can also provide great help
      czcams.com/video/l-wdLGYwlVc/video.html
      czcams.com/video/fRqUhj3mj70/video.html

  • @charushridhar3558
    @charushridhar3558 Před 2 lety

    what does -1 mean in Azure CLI commands ?

  • @maricrisbonzo3815
    @maricrisbonzo3815 Před 5 lety

    Its really a helpful Video for learner . Do I need to have vs subscription or i can just use Pay-As-You-Go azure subscription? Thanks.

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety

      Thanks. No, you can use Pay-As_you go

  • @A4amenvi
    @A4amenvi Před 4 lety +1

    Thank you for this free complete tutorial.
    Do you have or know of any video that does the same thing with github or gitlab and a private self hosted kubernetes?
    Thank you.

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety

      No problem
      For Git, see this video to the end. I am sure you will know things you didn't know before
      czcams.com/video/ZgCCnv9LxzA/video.html

  • @alexanderore6627
    @alexanderore6627 Před 2 lety

    In my build pipeline - Run services - I'm getting the message: ##[error]Creating network "aks_default" with the default driver - ##[error]hns failed with error : The parameter is incorrect. - ##[error]The process 'C:\ProgramData\Chocolatey\bin\docker-compose.exe' failed with exit code 1

  • @sivak417
    @sivak417 Před 4 lety

    Thank you, This session was helpful, Can you please help on below query.
    How you can move the image from Azure Registry container to AKS. As i don't see any ADO docker pull task.

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety

      This is in the YAML file, this is why we publish that to the artifact to give the deployment instruction

  • @adamzachary6947
    @adamzachary6947 Před 3 lety

    Hey Mohamed, I have a quick question ... I'm fairly new to AKS . My question is, once I deploy an ACR and attach ACR to my AKS, users will be forced automatically to download images though that ACR or they still can download images from anywhere ?

  • @marwenounis1374
    @marwenounis1374 Před 5 lety +1

    Thanks for your Awesome Tutorial , can you please share how configuration network of virtual Box image easily ? Thanks

    • @MRadwanMSF
      @MRadwanMSF  Před 5 lety

      Thanks Marwen!
      I am sorry, don't use Virtual box, I use Hyber-V

  • @najeebshhade9572
    @najeebshhade9572 Před 4 lety

    hi mohamad I want to ask you how can I run an image in command line I have an iso file and some dependencies how can I run it with the cmd (what is the command) that run the Iso with the dependencies ? thank you.

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety

      See this video
      czcams.com/video/RONwkB6RN9E/video.html

  • @TheSiddhaartha
    @TheSiddhaartha Před 3 lety

    Thanks! Is Azure Kubernetes the preferred way to deploy dotnet applications or azure web apps or azure service fabric? Is Azure Kubernetes in demand? Is it very difficult to manage the cluster?

    • @MRadwanMSF
      @MRadwanMSF  Před 3 lety +1

      If you use AKS, you don't have to manage cluster or in anohter word it become much easier.

    • @TheSiddhaartha
      @TheSiddhaartha Před 3 lety

      @@MRadwanMSF thanks! Do you use any Reports dashboards, ELK stack with AKS? Or something similar?

  • @manjula.cgowda
    @manjula.cgowda Před 3 lety +1

    Informational Video step by step for AKS.Please share the commands used

    • @MRadwanMSF
      @MRadwanMSF  Před 3 lety +2

      Thanks, here is the link for the post and the commands:
      mohamedradwan.com/2019/06/08/getting-started-with-kubernetes-cluster-ci-cd-pipelines-for-azure-kubernetes-service/

  • @kukonmiah5995
    @kukonmiah5995 Před rokem

    Hi Radwan this is grate video, but i am unable to create AKS Cluster and Node, error pup-up

  • @asitkumarrout9796
    @asitkumarrout9796 Před rokem

    can you provide commands for hands on activity

  • @TheMangineer
    @TheMangineer Před 4 lety +1

    32:15 Yours are pre-filled in, but as of today (June 2020), you need to fill this in:
    DB deployment: vs2017-win2016
    AKS deployment: ubuntu-16.04

    • @MRadwanMSF
      @MRadwanMSF  Před 3 lety +1

      I didn't try it soon but thank you so much for your comment! it's really helpful

    • @TheMangineer
      @TheMangineer Před 3 lety +1

      @@MRadwanMSF -- Happy to help

  • @sreekanthadari1
    @sreekanthadari1 Před 3 lety

    Thanks, for me its very confusing to see deployment process on AKS... for sure this must be easy as we understand the flow.

  • @nanireddy6742
    @nanireddy6742 Před 2 lety

    Hi i am having azure azure devops docker and kubernetes full content along with pdf

  • @venkatgude6913
    @venkatgude6913 Před 5 lety

    Hi.. Just gone through this tutorial and Push services failed with error "denied requested access to the resource is denied" ##[error]/usr/bin/docker failed with return code: 1... can you help me what did I miss?

    • @MRadwanMSF
      @MRadwanMSF  Před 5 lety

      It seems you don't have enough permission on Azure Container Registry, try to get more permission

    • @MrHectorjara
      @MrHectorjara Před 3 lety

      Hi Venkat could you fix the Push error ? I had the problem

  • @RajanieshKaushikk
    @RajanieshKaushikk Před 2 lety

    Mohamed, There is no Azure Public Azure container registry as depicted in the diagram. Actually, you are pulling the image from docker hub so please modify the diagram to reflect its correct representation!!

  • @ankitsrivastava256
    @ankitsrivastava256 Před 4 lety

    Mohamed, thanks for sharing this info.
    I have a task to complete.
    I have an EAR/JAR file on a VM.
    I have to deploy to AKS using azure Devops and docker. Can you please help me out.
    How to create a pipeline where do i need to install docker or just add a task in azure pipeline.
    Any help is much appreciated.

  • @sivashankarkuruva
    @sivashankarkuruva Před 3 lety

    Nice video, if you don't mine can u make another video take a code from git hub and excute same procedure.

  • @Ben-zb4wd
    @Ben-zb4wd Před 3 lety

    السلام عليكم
    استأذن حضرتك لو تضيف ترجمه بالعربى حتى لو subtitle

    • @MRadwanArabic
      @MRadwanArabic Před 3 lety

      ده النسخة العربية
      m.czcams.com/video/z3Kz6Qax7Q4/video.html

  • @nicholasrogoff6265
    @nicholasrogoff6265 Před 4 lety

    Thanks for that. Would be really good, but just too many adverts I'm afraid. Overlays...that actual talk over your presentation, Banners blocking the screen, and then full adverts interrupting every couple of minutes.

    • @MRadwanMSF
      @MRadwanMSF  Před 4 lety

      CZcams is like any other advertising platforms, you can get no-ad for a low price membership

  • @aloybackbanerjeeup7634

    Not thorough