Watch our introduction video to learn all about this #TerraformOnAzure coding challenge!
Now that we have our CI/CD pipeline setup for the team, it's time to pimp our web hosting to run on a Kubernetes cluster, specifically Azure Kubernetes Services (AKS). AKS is a fully managed Kubernetes cluster in Azure, and reduces the complexity of managing Kubernetes by offloading much of the operational responsibility to Azure.
The first step to deploy an application to a Kubernetes cluster, is to create container image using the Docker CLI. How this container image is created is described in a Dockerfile. The sample application already contains a preconfigured Dockerfile.
The next step is to publish this container image to a container repository, this could be Azure Container Registry (ACR) or any other registry (e.g. Docker Hub).
You can find a tutorial on how to publish a container image in ACR in our documentation site.
Finally, we need to describe how to deploy our application on a Kubernetes cluster. To do this, you can use the open-source Helm packaging tool. You will find a Helm chart in the sample application repo.
Note: make sure to update the image repository in the
values.yaml
file of the Helm chart to match your container repository:
image:
repository: tailwindtradersacr.azurecr.io/web.api
tag: prod
pullPolicy: Always
To successfully complete this challenge, you will need to:
- Use the Docker CLI to build a Docker image for the sample application and store it in a container registry
- Use the Terraform CLI to provision an AKS cluster.
- Deploy the sample application on the AKS cluster using Helm
Within 24 hours of making the coding challenge public, submit your solution as a custom ISSUE to this GitHub repository.
- Create your own Github repo with your solution for that challenge.
- Create a new Challenge Solution Submission issue in our repo for each challenge and fill all the details.
- Submit the issue.
- An Azure subscription, where you have permissions to create resource groups. You can get an Azure free account or send us a DM us on Twitter and we'll provide you with an Azure Pass.
- A GitHub account, allowing you to create a custom issue to submit your solution.
- Fork the sample application to your GitHub account.
- ✅ Azure Kubernets Service documentation
- ✅ Tutorial: Create a Kubernetes cluster with AKS and Terraform
- ✅ Tutorial: deploy an existing application to AKS using Helm
If you have any questions about the challenges, feel free to open an ISSUE HERE.
Make sure to mention which challenge is problematic. We'll get back to you soon!
If you don't have an Azure subscription yet, you can DM us on Twitter and we'll provide you with a 30-day Azure subscription! Alternatively, you can also sign up for an Azure free account.