Automated Deployments for Azure Kubernetes Service
Automated deployments simplify the process of setting up a GitHub Action and creating an automated pipeline for your code releases to your Azure Kubernetes Service (AKS) cluster. Once connected, every new commit will kick off the pipeline, resulting in your application being updated.
Note
Private clusters are currently not supported.
Prerequisites
- A GitHub account
- An AKS cluster
- An Azure Container Registry (ACR)
- An application to deploy
Configure an automated deployment
In the Azure portal, navigate to the resource group containing the AKS cluster you want to deploy the application to.
Select your AKS cluster, and then select Automated deployments on the left blade. Upon selecting Create, you'll be presented with two options. If you have an application that isn't yet containerized, you can select Automatically containerize and deploy to allow Azure to take care of the process for you. If you already have a containerized application, select Deploy an application.
Name your workflow and click Authorize to connect your Azure account with your GitHub account. After your accounts are linked, choose which repository and branch you would like to create the GitHub Action for.
Next, follow along with the section below that relates to the option you chose.
Automatically containerize and deploy an application to your AKS cluster
Fill out the fields, providing details about your application that will be used to automatically generate deployment artifacts.
Proceed to review and verify the automated deployment.
Deploy an already containerized application to your AKS cluster
Pick your dockerfile and your ACR and image.
Determine whether you'll deploy with Helm or regular Kubernetes manifests. Once decided, pick the appropriate deployment files from your repository and decide which namespace you want to deploy into.
Proceed to review and verify the automated deployment.
Review and verify the automated deployment
When finished, select Next: Deployment details and Next: Review, and review your deployment. Finally, select Next: Deploy to finish the creation of the automated deployment.
Click view pull request to see your GitHub Action.
Merge the pull request to kick off the GitHub Action and deploy your application.
Once your application is deployed, go back to automated deployments to see your history.
Clean up resources
You can remove any related resources that you created when you don't need them anymore individually or by deleting the resource group to which they belong. To delete your automated deployment, navigate to the automated deployment dashboard and select ..., then select delete and confirm your action.
Next steps
You can modify these GitHub Actions to meet the needs of your team by opening them up in an editor like Visual Studio Code and changing them as you see fit.
Learn more about GitHub Actions for Kubernetes.
Azure Kubernetes Service
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for