Deploy Kasten on your Azure AKS

DevOps culture is becoming the norm of the cloud era. Many companies are beginning to think of implementing this culture into their businesses. As an IT professional, is important that you be familiar with these new skills, and be prepared to use them in the future. How do we start?

 

As a solution architect who is also responsible for building the company’s product calculators, I find myself working with many development management products to manage the products that I’m running. This led me to learning more about Azure DevOps to better manage the life cycles of several products I’m working on.

To better gain hands-on experience with the Azure DevOps tools set, I combined my knowledge of the AKS (Azure Kubernetes Service) with DevOps, and on this blog post, I believe many of you have probably have the same desire to learn more about AKS and DevOps and don’t know where to start. In this blog post, we will cover the following items:

  • An easy and fast way to deploy an Azure AKS cluster
  • Deploy Veeam Kasten Backup
  • Next blog: Use Azure DevOps Pipelines to deploy the first container

Note: This blog post is the foundation of my Azure DevOps learning journey. I am starting with these products and tools because I want to associate my learning with the real-life experiences of the DevOps engineers.

Prepare the Environment

To follow the steps on this blog post, our machine must be ready with these apps:

  • Install Kubectl
  • Azure Cli
  • Web Browser

Later on, when we deploy our Azure AKS, we must use the Kubctl command to interact with the cluster. If you don’t have the Kubectl command installed, then the easiest way to install it is to use the following steps:

The next tool to be installed is the Azure CLI. Run the following Powershell command:

After the installation is completed, close, and then re-open the command line. You are now ready to login into your Azure subscription to deploy the AKS. To deploy, run through the below steps:

  • Login into Azure
    • Az login
    • az account set –subscription <SubscriptionName>

Deploy AKS Cluster

After you have completed the steps above, you are ready to install the AKS cluster.

Note: The cluster we are going to use on this blog post is for testing purposes only.

First, let’s login to our Azure subscription using the following command:

  • Az login -u <username>

If you own several subscriptions, you can use the following command to select the subscription you wish to use:

  • az account set –subscription <SubscriptionName>

Lets now create a resource group to host our AKS Cluster:

  • az group create –name myAksResourceGroup –location australiaeast

After you have completed the login and are ready to start the AKS deployment, run the following command to create the AKS cluster:

  • az aks create –resource-group myAksResourceGroup –name myAKSCluster –node-count 1 –enable-addons monitoring –location australiaeast –generate-ssh-keys

The commands listed above will take some time to complete. After the cluster deployment is complete, you can find the new AKS cluster deployed under the group:

myAksResourceGroup:

From the command line, we can check our AKS. Run the following command after logging into the Azure subscription:

  • az account set –subscription <subscription ID>

Note: Subscription ID can be found using the following command:

az account show –query id

  • az aks get-credentials –resource-group myAksResourceGroup –name myAKSCluster

Now we are ready to run some AKS commands:

  • Node List: kubectl get nodes

From the screenshot above, we notice that we deploy our AKS with one node. For the purposes of a learning exercise, run the following commands:

  • kubectl get deployments –all-namespaces=true
  • kubectl get services –all-namespaces=true

Deploy Kasten.io Backup

In the following steps, we will quickly go through the deployment of the Veeam Kasten backup steps:

  • Deploy Kasten backup on our newly created AKS
  • Expose Kaster deployment to the AKS load balancer
  • Obtain Kaster Token
  • Login

Don’t be overwhelmed by those tasks; I will show you how to run the first two steps as a single command. Let’s start:

Connect to the AKS using the Azure CLI:

This time we will use the AKS connect option to connect to the Azure CLI to start the deployment.

From Azure, AKS cluster, click on connect:

Click on Open Azure Cloud Shell. Then run the two commands presented on the screen:

Note: After the Cloud Shell opens, run those two commands above.

After you have completed the steps shown above, and then connected to the AKS cluster, you are ready to follow the command following to install the Kasten backup:

  • Create Kasten namespace: kubectl create namespace kasten-io
  • Add Kasten helm chart: helm repo add kasten https://charts.kasten.io/

Create the Azure App Registrations by browsing to the Azure Active Directory – App Registrations; from there, create a new App:

Select Register; then open the new created App. Copy the following information:

  • Tenant ID
  • Client ID
  • Client Secret

Note: You must create a secret by browsing to the Certificate and Secrets option at the left side of the menu.

After you have retrieved all the above, you are ready to run the following command to deploy Kasten backup:

  • helm install k10 kasten/k10 –namespace=kasten-io –set secrets.azureTenantId=<ID> –set secrets.azureClientId=<ID> –set secrets.azureClientSecret=<ID> –set externalGateway.create=true –set auth.tokenAuth.enabled=true

The deployment will take some time; in the meantime, we obtain the token by running the following command:

  • Get the list of the secret keys: kubectl get secret -n kasten-io

Note: record the ID of the default admin account

  • kubectl get secret k10-k10-token-<ID> –namespace kasten-io -ojsonpath=”{.data.token}{‘\n’}” | base64 –decode

The last step is to obtain the Kaster public IP by running the following command:

  • kubectl get services -n kasten-io query gateway-ext

That’s it! Use this IP on your browser to access the Kasten interface:

http://<IP Address>/k10/#/

Then use the token you obtained previously.

Summary

At this point, we completed the steps to deploy our demonstration AKS cluster, along with the Kasten backup tool. I have run through these steps several times and learned a lot from many mistakes. I’m pleased that now, after this long learning experience, I have been able to share my experience and make the steps sufficiently straightforward so as to get you started. In the next blog post I will share how I deployed my first application to the AKS using the Azure DevOps tool set as part of my new learning path. Till the next blog post, please don’t hesitate to share the blog on your social media or share your feedback on the chat below.

Leave a Reply