In this blog post, I am going to setup a web server from scratch on Azure AKS by using Pulumi typescript application.
The technology stack is Angular and .NET Core rest api based on http://abp.io framwork, it shows basic information of top rated movies, the source is stored at https://github.com/hadoan/TmdbMovies
- Install Pulumi https://www.pulumi.com/docs/get-started/install/
- Install Azure Cli https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest and login by command az login
- Create new Pulumi project: pulumi new azure-typescript
- Create new SQL database instance
- Create new AKS instance
Generate public key and set pulumi config
ssh-keygen -t rsa -f key.rsa
pulumi config set sshPublicKey < key.rsa.pub
pulumi config set aks_password strong_password
Then define new AKS cluster in typescript as below:
- Deploy SQL and AKS
Run Pulumi up to create SQL Server and AKS instances

This is the result

The full source-code for Azure deployment is at https://github.com/hadoan/TmdbMovies/tree/master/azure-pulumi
- Create new k8s Pulumi project: pulumi new kubernetes-typescript
The source-code for k8s pulumi here https://github.com/hadoan/TmdbMovies/tree/master/k8s-pulumi, following are steps:
- Create dockerfile for angular application
- Deploy to DockerHub, you can also push image to Azure Container Registry by guidance here
docker build -t tmdbmovies-frontend
docker tag tmdbmovies-frontend hadoanmanh/tmdbmovies-frontend
docker push
- Create docker file for .net core and deploy to DockerHub
After that we have 2 docker images in docker hub:
Backend: https://hub.docker.com/repository/docker/hadoanmanh/tmdbmovies-api
Frontend: https://hub.docker.com/repository/docker/hadoanmanh/tmdbmovies-frontend
- Create Kubernetes deployment to deploy .NET core Backend
- Define .net core back-end service
- Create kubernetes deployment and service, it is same as .net core. The source-code for angular is at https://github.com/hadoan/TmdbMovies/tree/master/k8s-pulumi/aks/tmdbmovies-frontend
- Install kubectl
az aks install-cli
- Login to AKS
az aks get-credentials --resource-group resource-group-abp-microservice-demo --name demo-aksclustercc4d76ed

- Run
pulumi up
to deploy backend and angular to AKS - Enable AKS dashboard

az aks enable-addons -g resource-group-abp-microservice-demo -n demo-akscluster34a4f9c3 -a kube-dashboard
View dashboard
az aks browse — resource-group resource-group-abp-microservice-demo — name demo-akscluster34a4f9c3

Go to service to see IP of your angular and backend service, my demo application is hosted at http://52.187.150.193/
Have fun to play with AKS!