This article is contributed. See the original author and article here.

Now, you can take your containerized app to Azure Kubernetes Service (AKS) in a few simple steps by using GitHub Actions. 


 


A GitHub Actions workflow will be configured for your GitHub repository. The workflow builds and deploys a container image to an AKS cluster every time new commits are pushed to a given branch of the GitHub repository. 


 


Once you have set up you will be able to trace the GitHub commits and issues that got deployed to the Deployment workload. For this we have added a “ChangeLog” view in context of Deployment Workload in Azure Kubernetes Service. This view has 



  1. Details of the GitHub commits and issues that got deployed. You can use the links on this view to navigate to GitHub portal for more details of a specific issue or commit.

  2. The GitHub Workflow that was used to build and deploy these changes.


Screenshot 2020-10-28 at 10.38.29 AM.png


 


 


You can extend the default GitHub Actions Workflow and add richer capabilities: like provisioning additional Azure resources, deploying to another AKS cluster, running scripts or for running container scanning, integration tests.


 


We are adding support for configuring GitHub Actions for Azure Kubernetes Service in Deployment Center in Azure Portal as well as Azure Kubernetes Service extension in Visual Studio Code. Now you can create the appropriate GitHub Actions workflows in the context of your favourite tool – Azure Portal or Visual Studio Code.


 


Azure Kubernetes Service Deployment Center



  1. Deployment Center analyses the repository and detects your Dockerfile and Kubernetes manifest files. In case, the Kubernetes manifest files are not present, the experience will auto generate the manifest files. 

  2. Based on the repository analysis the experience generates and commits a GitHub Actions workflow file to the GitHub repository

  3. A GitHub repository secret is added which contains the content of kubeconfig. A GitHub repository secret is added which contains the content of kubeconfig.This secret is used by workflow to connect to the AKS cluster and deploy the application.

  4. The generated GitHub Actions Workflow will build container image; push the image into Azure Container Registry and then deploy it to a new or an existing namespace. 


 


Screenshot 2020-10-27 at 10.33.28 PM.png


 


The AKS Deployment Center shows you all the workflows that are targeting that particular AKS cluster. This gives you a quick summary view of what workflows that are updating your cluster, thereby giving you details of what process is being followed for the deployments. 


 


Screenshot 2020-10-27 at 10.38.33 PM.png


 


Azure Kubernetes Service VS Code extension


We are adding a couple of additional commands in the Azure Kubernetes Service Visual Studio Code extension, 



  1. First one being “Configure CI/CD Workflows” that enables you to setup GitHub Actions workflows from within Visual Studio Code.  This is similar to the Deployment Center feature for AKS and provides the same guided workflow setup and traceability features.

  2. Another one is “Browse CI/CD Workflows” which helps you view all the workflows that are configured for a particular AKS cluster.  From this listing you can navigate to Deployment Center experience in Azure Portal for traceability, issue and commit tracking.


 


image.png


 


 


If you have any changes you’d like to see or suggestions for these features, then we’d love your feedback as well as contributions to the GitHub Action repository taking pull requests. If you encounter a problem with any specific action, you can also open an issue on the action repository.



  1. View more GitHub integrations with Azure to automate your code-to-cloud workflow.

  2. Check out the comprehensive list of GitHub Actions.


 

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.

%d bloggers like this: