diff --git a/docs/user/getting-started.md b/docs/user/getting-started.md index 2eb9567b52c..2b488dee05a 100644 --- a/docs/user/getting-started.md +++ b/docs/user/getting-started.md @@ -24,11 +24,38 @@ The above commands will deploy Kubeapps into the `kubeapps` namespace in your cl Access to the Dashboard requires a Kubernetes API token to authenticate with the Kubernetes API server. -``` +```bash kubectl create serviceaccount kubeapps-operator kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator +``` + +To retrieve the token, + +On Linux: + +```bash 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: + +```bat +@ECHO OFF +REM Get the Service Account +kubectl get serviceaccount kubeapps-operator -o jsonpath={.secrets[].name} > s.txt +SET /p ks= 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](/docs/user/access-control.md) documentation to configure fine-grained access control for users.