Deploy Bitnami Applications on AKS and Azure Stack with Kubeapps

Introduction

Azure Stack makes it possible to run applications using a combination of on-premise and cloud services. This hybrid approach makes it easy to combine multiple tools and services and deliver more flexible enterprise, mobile and Web solutions.

You can use the Azure Kubernetes Service (AKS) Engine to create Kubernetes clusters on Azure Stack, and then deploy applications to those clusters. And one of the easiest ways to deploy those applications is Kubeapps, a Web-based UI for deploying and managing applications in Kubernetes clusters.

This article introduces you to Kubeapps with AKS on Azure Stack and shows you how to install and use the Kubeapps dashboard to deploy, manage and upgrade Bitnami applications on your Kubernetes cluster.

Why Kubeapps?

Kubeapps is a one-time install that gives you a number of important benefits, including the ability to:

  • browse Helm charts from public or your own private chart repositories and deploy them into your cluster;
  • customize deployments through an intuitive, form-based user interface;
  • upgrade, manage and delete the applications that are deployed in your Kubernetes cluster;
  • browse and provision external services from the Service Catalog and available Service Brokers.

Assumptions and prerequisites

This article assumes that:

This article demonstrates how to use Kubeapps by deploying the Bitnami WordPress Helm chart. This will give you a pre-configured WordPress blog on your AKS cluster that you can start using right away. But WordPress is just an example: there are many other Bitnami applications to choose from, and they're all equally easy to set up.

Installing Kubeapps

The first step is to install Kubeapps, as described below:

  • Use Helm to install Kubeapps:

    helm repo add bitnami https://charts.bitnami.com/bitnami
    helm install --name kubeapps --namespace kubeapps bitnami/kubeapps
    
  • Create a service account and role binding for Kubeapps and obtain an authorization token to log in to Kubeapps:

    kubectl create serviceaccount kubeapps-operator
    kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator
    kubectl get secret $(kubectl get serviceaccount kubeapps-operator -o jsonpath='{.secrets[].name}') -o jsonpath='{.data.token}' -o go-template='{{.data.token | base64decode}}' && echo
    

    Note the token displayed as you will need it to log in to the Kubeapps dashboard.

  • Forward the necessary port for browser access:

    export POD_NAME=$(kubectl get pods -n kubeapps -l "app=kubeapps,release=kubeapps" -o jsonpath="{.items[0].metadata.name}")
    kubectl port-forward -n kubeapps $POD_NAME 8080:8080
    

You should now be able to access Kubeapps by browsing to http://127.0.0.1:8080 on your local system. This is what you should see:

Kubeapps login

Log in using the token obtained previously and you should see the Kubeapps dashboard, as shown below:

Kubeapps dashboard

Deploying applications with Kubeapps

The next step is to deploy WordPress on your AKS cluster. The easiest way to do this is with a Helm chart, and Kubeapps gives you one-click access to a large number of such charts.

Follow these steps:

  • From the Kubeapps dashboard, click the "Catalog" menu option in the top navigation bar.
  • Search for and select the Bitnami WordPress Helm chart.
Kubeapps WordPress chart
  • On the chart detail page, click the "Deploy" button.
Kubeapps WordPress deployment
  • You will now be presented with a form, which allows you to change common parameters, such as the username or password. You can also choose whether to have Kubeapps deploy a database in the cluster or configure the application to connect to an external database service, enable a custom hostname, or define resource usage.
Kubeapps WordPress deployment configuration
Tip

This pre-deployment form is one of the most useful new features in Kubeapps v1.6.0, which allows you to customize your deployment without needing to modify chart configuration files. Read more about this and other new features in Kubeapps v1.6.0.

  • Click "Submit" to proceed. Kubeapps will deploy the Helm chart and display a status screen as the chart is installed. Refresh the page until Kubeapps reports that the deployment is "ready":
Kubeapps WordPress chart deployment
  • If you did not already set a password, get the credentials for WordPress by executing the commands shown in the NOTES section of the Kubeapps status screen:
Kubeapps WordPress chart commands

Browse to the load balancer URL (or to the hostname, if you used a custom hostname with Ingress) shown on the Kubeapps status screen and you should see your WordPress application running. Here's what it should look like:

WordPress welcome page

Upgrading and deleting deployments

Kubeapps also makes it easy to seamlessly upgrade your application to a later version. When an update is available, a message indicating this will appear on the deployment detail page. Simply click the "Upgrade" button on the deployment detail page to upgrade the deployment:

Kubeapps WordPress deployment upgrade

You will be presented with the same deployment customization form you saw previously, together with a list of available versions of the chart. Select the version you wish to use, enter the configuration details and click "Submit" to upgrade your deployment. It's as easy as that!

To remove a deployment, click the "Delete" button on the deployment detail page.

Useful links

To learn more about the topics discussed in this article, visit the links below: