Press "Enter" to skip to content

Getting KubeApps installed

bist 0

It is super simple to get started and we are going to start by adding the helm chart for KubeApps, again we already covered Helm and the benefits and ease this package manager brings well it makes life really easy when deploying KubeApps which will then act as the UI it seems at least to me to some of those Helm Charts. Lets start with the following command:

helm repo add bitnami

kubectl create namespace kubeapps

helm install kubeapps --namespace kubeapps bitnami/kubeapps

the above command is going to add the helm repository and charts to your local machine, create a kubeapps namespace and then install that chart to your Kubernetes cluster and into that newly created namespace.

After running the above if we go and run kubectl get all -n kubeapps you will get the following output for all the components we have to build up KubeApps.

030621 2304 Buildingthe1


030621 2304 Buildingthe2

As you can see there is quite a lot happening above, you will also notice that on service/kubeapps service we are using a LoadBalancer port if we run the following command you can see the description of this service.

kubectl describe service/kubeapps -n kubeapps
030621 2304 Buildingthe3

if you need to update your service configuration to the correct port type then you can do this by running the following command and changing the port type.

kubectl edit service/kubeapps -n kubeapps
030621 2304 Buildingthe4

On my cluster I have the traefik loadbalancer. I had to change the type: Cluster to type: LoadBalancer

If you followed my previous posts you will know that rancher is running on port 80. Kubeapps needs to run on another port. In my case I changed

port: 80 to port: 8080

Ok, now either with your Load balancer IP or your node address you will be able to open a web browser.

kubectl get service/kubeapps -n kubeapps 

030621 2304 Buildingthe5From the above, we need to navigate to in your web browser, and you should see the following page appear.

030621 2304 Buildingthe6

You will notice from the above we now need an API token so let’s go and grab that to get in. first of all for demo or home lab purposes we are going to create a service account and cluster role binding with the following commands.

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

then to get that API token we need the following command:

kubectl get secret $(kubectl get serviceaccount kubeapps-operator -o jsonpath='{range .secrets[*]}{.name}{"\n"}{end}' | grep kubeapps-operator-token) -o jsonpath='{.data.token}' -o go-template='{{.data.token | base64decode}}' && echo
030621 2304 Buildingthe7

Leave a Reply

Your email address will not be published. Required fields are marked *