Access Kubeapps Dashboard and deploy a k8s app

Updated on

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

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

Retrieve the API token and Dashboard URL

To retrieve the API token and Kubeapps Dashboard URL, execute the GetDashToken.ps1 file located at C:/Tanzu.


Note the token and Kubeapps URL displayed as output on your PowerShell window. We will highlight and copy the URL first by  using Ctrl + C (Windows)  or Command (⌘) + C (macOS). Alternatively use your mouse right click button to Copy.

Open a New Tab on Google Chrome and browse to the URL. It should be in the format http://10.54.x.x

Login to the Kubeapps Dashboard

When prompted, paste the API token generated in the previous step.

We will highlight and copy the API Token first by  using Ctrl + C (Windows)  or Command (⌘) + C (macOS). Alternatively use your mouse right click button to Copy.  

Next, paste the token on Kubeapps login screen by 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.

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.

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.

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

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.

Previous Article Access your cluster and install Kubeapps using Helm