Add kubeapps install for kubernetes

This commit is contained in:
Sambo Chea 2021-10-14 10:32:01 +07:00
parent 1d4fe81ccb
commit 4f9dc79c60
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490

34
KUBEAPPS.md Normal file
View File

@ -0,0 +1,34 @@
# Install Kubeapps from Bitnami
- Install
```shell
helm repo add bitnami https://charts.bitnami.com/bitnami
kubectl create namespace kubeapps
helm install kubeapps --namespace kubeapps bitnami/kubeapps
```
- Service Account
```shell
kubectl create --namespace default serviceaccount kubeapps-operator
kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator
```
- Get Token (Linux/macOS)
```shell
kubectl get --namespace default secret $(kubectl get --namespace default 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
```
- Get Token (Windows)
```shell
@ECHO OFF
REM Get the Service Account
kubectl get --namespace default 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 --namespace default secret %ks% -o jsonpath={.data.token} > b64.txt
REM Decode The Token
DEL token.txt
certutil -decode b64.txt token.txt
```