This guide will walk you through the process of deploying Kubeapps for your cluster and installing an example application.
Kubeapps assumes a working Kubernetes cluster (v1.8+), Helm
(2.9.1+) installed in your cluster and kubectl
installed and configured to talk to your Kubernetes cluster. Kubeapps has been tested with Azure Kubernetes Service (AKS), Google Kubernetes Engine (GKE), minikube
and Docker for Desktop Kubernetes. Kubeapps works on RBAC-enabled clusters and this configuration is encouraged for a more secure install.
Use the Helm chart to install the latest version of Kubeapps:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install --name kubeapps --namespace kubeapps bitnami/kubeapps
IMPORTANT This assumes an insecure Helm installation, which is not recommended in production. See the documentation to learn how to secure Helm and Kubeapps in production.
For detailed information on installing and configuring Kubeapps, checkout the chart README.
The above commands will deploy Kubeapps into the kubeapps
namespace in your cluster, it may take a few seconds to execute. Once it has been deployed and the Kubeapps pods are running, continue to step 2.
Access to the Dashboard requires a Kubernetes API token to authenticate with the Kubernetes API server.
kubectl create serviceaccount kubeapps-operator
kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator
To retrieve the token,
On Linux:
kubectl get secret $(kubectl get serviceaccount kubeapps-operator -o jsonpath='{.secrets[].name}') -o jsonpath='{.data.token}' | base64 --decode
On Windows:
Create a file called GetDashToken.cmd
with the following lines in it:
@ECHO OFF
REM Get the Service Account
kubectl get serviceaccount kubeapps-operator -o jsonpath={.secrets[].name} > s.txt
SET /p ks=<s.txt
DEL s.txt
REM Get the Base64 encoded token
kubectl get secret %ks% -o jsonpath={.data.token} > b64.txt
REM Decode The Token
DEL token.txt
certutil -decode b64.txt token.txt
Open a command prompt and run the GetDashToken.cmd
Your token can be found in the token.txt
file.
NOTE: It's not recommended to create cluster-admin
users for Kubeapps. Please refer to the Access Control documentation to configure fine-grained access control for users.
Once Kubeapps is installed, securely access the Kubeapps Dashboard from your system by running:
export POD_NAME=$(kubectl get pods -n kubeapps -l "app=kubeapps,release=kubeapps" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 in your browser to access the Kubeapps Dashboard"
kubectl port-forward -n kubeapps $POD_NAME 8080:8080
This will start an HTTP proxy for secure access to the Kubeapps Dashboard. Visit http://127.0.0.1:8080/ in your preferred web browser to open the Dashboard. Here's what you should see:
Paste the token generated in the previous step to authenticate and access the Kubeapps dashboard for Kubernetes.
Once you have the Kubeapps Dashboard up and running, you can start deploying applications into your cluster.
-
Use the "Charts" page in the Dashboard to select an application from the list of charts in the official Kubernetes chart repository. This example assumes you want to deploy WordPress.
-
Click the "Deploy using Helm" button.
-
You will be prompted for the release name, cluster namespace and values for the application.
-
Click the "Submit" button. The application will be deployed. You will be able to track the new Kubernetes deployment directly from the browser.
To obtain the WordPress username and password, refer to the "Notes" section of the deployment page, which contains the commands you will need to run to obtain the credentials for the deployment.
Learn more about Kubeapps with the links below: