Using kubeapps - A Bitnami Project
Kubeapps(https://kubeapps.com/) radically help in simplifying deploying applications onto a K8S cluster.
We will test this on a kind cluster(kind create cluster)
Install helm if you don’t have it already using
brew install helm
Add the bitnami repo using - helm repo add bitnami https://charts.bitnami.com/bitnami
Create a namespace called as kubeapps - kubectl create namespace kubeapps
Install kubeapps using the command:
~helm install kubeapps --namespace kubeapps bitnami/kubeapps
The output would be as below:
NAME: kubeapps
LAST DEPLOYED: Mon Nov 23 16:01:19 2020
NAMESPACE: kubeapps
STATUS: deployed
REVISION: 1
NOTES:
** Please be patient while the chart is being deployed **
Tip:
Watch the deployment status using the command: kubectl get pods -w --namespace kubeapps
Kubeapps can be accessed via port 80 on the following DNS name from within your cluster:
kubeapps.kubeapps.svc.cluster.local
To access Kubeapps from outside your K8s cluster, follow the steps below:
1. Get the Kubeapps URL by running these commands:
echo "Kubeapps URL: http://127.0.0.1:8080"
kubectl port-forward --namespace kubeapps service/kubeapps 8080:80
2. Open a browser and access Kubeapps using the obtained URL.
➜ ~ kubectl port-forward --namespace kubeapps service/kubeapps 8080:80
To access kubeapps, you will need a token, ideally an K8S API token but just for kind, we can create a service account and create a clusterrolebinding for it and then extract the token out of it.
To create a service account:
~ kubectl create serviceaccount kubeapps-operator
Now create a ClusterRoleBinding:
~ kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator
Now extract the token from the secret created:
~ 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
Now do a port-forward using the command below
~ kubectl port-forward --namespace kubeapps service/kubeapps 8080:80
Copy the token to authenticate on the browser to see the page.
Let’s deploy Project Contour :
Search for contour under catalog :
This gives you the helm command for contour:
~ helm install my-contour bitnami/contour
Once done you could uninstall by using the command:
~ helm uninstall my-contour