Using “Deploy Application” In Azure Kubernetes Service (AKS)

Using “Deploy Application” In Azure Kubernetes Service (AKS)

The majority of the time for startups and small-to-medium-sized organizations, stuff just “needs to work”. The pipeline needs to pass, the infrastructure needs to be easy to configure, and the overall deployment needs to work as close to out-of-the-box as possible.

Prerequisites

To follow along with this blog post from a hands-on perspective, you should have an Azure account. If you don’t have one, you can sign up for a 30-day free trial (with 200 credits) here.

What Is The Deploy Application Service

As you begin to test out the Deploy Application option/service, you may see some similarities from other tools or even other workload configurations like GitOps.

So far, the new service/option seems like a mix between what GitOps does and what various build processes do from:

  1. Creating a Dockerfile.
  2. Building the container image.
  3. Building a pipeline to automatic steps one and two.
  4. Ensuring that the pipeline has a deployment process.
  5. Cluster management and/or creation.

The Deploy Application Service combines all of these steps into, well, a few steps.

Configuring The “Deploy Application” Service

Sections will be split up into:

  1. Configuration
  2. Creation
  3. Deployment

In the first section, you’ll learn the key steps to configuring the Service.

  1. From the Azure Portal, go to the AKS service.
  1. Choose the Deploy application (new) service.
  1. Here, you’ll see two options. Deploy a sample app or use one of your own. The best option is to use one of your own so you can see the power behind this service.
💡
If you don’t have your own, feel free to use the same app that I used in this blog post: https://github.com/AdminTurnedDevOps/GoWebAPI
  1. Add in your subscription and resource group information along with a name for the app.
  1. You’ll need to configure access to GitHub as a pipeline will be automatically created for you to deploy the app.

In the next section, you’ll see how to configure the application for deployment.

Configuring The App Metadata

  1. Within the repository section, you’ll choose the application you’re deploying and the branch (once you’ve authorized to GitHub, which was done in the previous section).
  1. In the second step, you’ll be able to choose an existing Dockerfile or have one generated for you.This really shows the entire automation process behind this service. The goal is to really be “no-code” from the sense of building the deployment process.If you chose the GoWebAPI project, a Dockerfile already exists. You can also test it out without using the Dockerfile that exists by having the service generate a new one for you.

Below is the repo where you can see the Dockerfile that already exists.

  1. You can see in the screenshot below that a Dockerfile has been chosen.
  1. For this deployment, you’ll need an Azure Container Registry (ACR) deployed.
  1. The next step within the configuration is to choose between using an existing Kubernetes Manifest or having one generated for you. For the purposes of this blog post to see the true automation capability behind this service, you can have it generate a Manifest for you like in the screenshot below.
  1. The last step is to choose where you want the Manifest to exist. In this case, I put it on the root directory, which is the GitHub repo of the project.

Next up, you’ll learn how to deploy the app.

App Deployment

Now that the application is configured, let’s learn how to deploy it.

  1. The first step is figuring out whether you want to deploy the application to an existing Azure Kubernetes Service (AKS) cluster or if you want to create a new one.If you create a new one, it’ll be created via AKS Automatic, which is a fully managed AKS cluster.
  1. The last step is to deploy the application.
  1. You’ll now have to wait until the deployment process is fully complete. Feel free to go and grab a snack as it could take a while.
  1. Once complete, go into the Kubernetes service and you’ll see the cluster deployed.
  1. Diving into the Pods that are deployed to the Kubernetes cluster, you should see your application running as expected.

Closing Thoughts

This new service is great for teams that just need to “get the thing up and running” and in many cases, that’s what organizations need. Whether it’s a small startup or an enterprise that needs to see how an application is going to perform in Dev without having to assign several engineers to do the task.