Skip to content

Latest commit

 

History

History
73 lines (43 loc) · 4.88 KB

File metadata and controls

73 lines (43 loc) · 4.88 KB

Challenge 4: Deploying to Azure Kubernetes Service

Rocket Lift-off

Watch our introduction video to learn all about this #TerraformOnAzure coding challenge!

Description

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

Success criteria 🏆

To successfully complete this challenge, you will need to:

  1. Use the Docker CLI to build a Docker image for the sample application and store it in a container registry
  2. Use the Terraform CLI to provision an AKS cluster.
  3. Deploy the sample application on the AKS cluster using Helm

How to submit your solution?

Within 24 hours of making the coding challenge public, submit your solution as a custom ISSUE to this GitHub repository.

  1. Create your own Github repo with your solution for that challenge.
  2. Create a new Challenge Solution Submission issue in our repo for each challenge and fill all the details.
  3. Submit the issue.

Prerequisites

  • 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.

Resources/Tools Used 🚀

More Resources

Questions? Comments? 🙋‍♀️

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!

I don't have an Azure subscription! 🆘

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.