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:
- You have installed AKS on Azure Stack and created a fresh Kubernetes v1.8+ cluster. Learn more about installing AKS on Azure Stack.
- You have installed and configured kubectl for your cluster.
- You have installed Helm v3.x on your cluster.
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.
Watch the following video or keep reading this tutorial to learn more:
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 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:

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

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.

- On the chart detail page, click the "Deploy" button.

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

- Click "Deploy" to proceed. Kubeapps will deploy the Helm chart and display a status screen as the chart is installed. Wait until Kubeapps reports that the deployment is "ready":

- If you did not already set a password, get the credentials for WordPress from the "Application Secrets" section of the deployment page or by executing the commands shown in the NOTES section of the deployment output:

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:

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:

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: