Saturday, August 29, 2020

AKS Series– Using Azure Dev Spaces with Visual Studio Kubernetes Tooling

  

Azure Kubernetes Service brings a world class managed Kubernetes service to the cloud. Customers can now leverage the power of Kubernetes platform without having to worry about managing the control plane. As a result of that, customers are now able to embark on the containerization journey with confidence. In this blog post, we will see how Visual Studio makes it easy to collaborate with AKS using Azure Dev Spaces.

Let’s get started.

Step 1 – Install the Kubernetes tools for Visual Studio 2017. This can be found here – https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vs-tools-for-kubernetes

Step 2 – Open Visual Studio 2017 and Create a new project.

Step 3 – Choose Container Application for Kubernetes template and name the project devspacedemo and Click Ok.

image

Step 4 – Choose Web Application MVC for the template.

image

Step 5 – You will get an option to create public endpoint for the application in the Kubernetes cluster.

image

Step 6 – As part of the scaffolding, Visual Studio creates Dockerfile and azds.yaml. Dockerfile is used to create container image. The azds.yaml files describes HELM chart and configurations needed to install the HELM chart.

image

Step 7- Click on Azure Dev Spaces in Visual Studio to run our application and deploy it in AKS cluster. Create a new AKS cluster if it’s not created yet and Click Ok.

SNAGHTML104430c6

Step 8 – Enable Dev Spaces in the AKS cluster if it already is not.

image

image

Step 9 – Visual Studio deploys the application to AKS. Once the deployment is finished, Visual Studio will open the endpoint for the Web application in the browser. In this blog post, we saw how to use Kubernetes tools in Visual Studio to deploy aspnet core application inside the AKS Dev Space.

SNAGHTML1058fcb0

No comments:

Post a Comment