Access Kubeapps Dashboard and deploy a k8s app

Updated on

In this section, we will access the Kubeapps Dashboard and deploy WordPress

30. Create a Service Account for Kubernetes API Token

Access to the Kubeapps Dashboard requires a Kubernetes API token to authenticate with the Kubernetes API server. We will create a service account and  assign it permissions to access Kubeapps.

kubectl create serviceaccount kubeapps-operator
kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator

31. Retrieve the API token and Dashboard IP

To retrieve the API token, run the GetDashToken.cmd file located at C:/Tanzu. The token will be displayed on your PowerShell window. Copy the token by highlighting it and using Ctrl + C (Windows)  or Command (⌘) + C (macOS). Alternatively use your mouse right click  button to Copy.


Next, fetch the Load Balanced IP address for Kubeapps Dashboard using the following command:

kubectl get svc -n kubeapps

Note the IP address displayed under "External IP" column for name "kubeapps". It should be in the following format - 10.174.x.x as highlighted in the screenshot.

32. Login to the Kubeapps Dashboard

Open a New Tab on Google Chrome and browse to the IP  (using http only). When prompted, paste the API token generated in the  previous step using Ctrl + V (Windows) or Command (⌘) + V (macOS) and hit Submit to authenticate and access the Kubeapps   Dashboard.

Alternatively use your mouse right click  button to Paste.

33. Deploy WordPress

Once you have the Kubeapps Dashboard up and running, you can start deploying applications into your cluster.

Use the 'Deploy App' or click on the 'Catalog' page in the Dashboard to select an application from the list of charts in any of the configured Helm chart repositories. For our Demo, we will deploy WordPress. Search by typing 'wordpress' on the Search Bar, and launch the tile. The Helm Chart page would open up next.

Click the 'Deploy' button. You will be prompted for the release name and values for the application. The form is populated by the values (YAML), which you can see in the adjacent tab. After you've inserted a name on the Form page, scroll to the bottom of the page and click the 'Submit' button. The application will be deployed.

34. Access the WordPress site

After the app is set to deploy, you can track the new Helm deployment directly from the browser. The status will be shown at the top and you can also look at the individual resources lower in the page. It will also show the number of ready pods. If you run your cursor over the status, you can see the workloads and number of ready and total pods within them.

To access your new WordPress site, you can simply click the URL (HTTP and HTTPS) shown. To get the credentials for logging into your WordPress account, refer to the Notes section.

35. Delete WordPress App

If you want to uninstall/delete your WordPress application, you can do so by clicking the 'Delete' button. You will now get redirected to the Kubeapps 'Applications' page. The deletion can be further verified by validating that there are no 'wordpress' pods in the default namespace.

kubectl get pods

36. More Activities

This concludes our walkthrough. Please feel free to deploy other  applications from the Kubeapps Catalog and also don't forget to checkout  more free courses at our ModernApps Ninja page.

Also, once you mark this Activity as complete, you will get an option to choose the next Activity on the Path Progress page, where you can scroll through each Phase (Learn | Evaluate | Validate) and continue exploring VMware Tanzu Standard.