docs: how to get serviceAccountToken
Signed-off-by: gazandi <gazandi@ruangguru.com>
This commit is contained in:
@@ -73,10 +73,18 @@ cluster. Valid values are:
|
||||
| `serviceAccount` | This will use a Kubernetes [service account](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) to access the Kubernetes API. When this is used the `serviceAccountToken` field should also be set. |
|
||||
| `google` | This will use a user's Google auth token from the [Google auth plugin](https://backstage.io/docs/auth/) to access the Kubernetes API. |
|
||||
|
||||
### `clusters.\*.serviceAccount` (optional)
|
||||
### `clusters.\*.serviceAccountToken` (optional)
|
||||
|
||||
The service account token to be used when using the `serviceAccount` auth
|
||||
provider.
|
||||
provider. You could get the service account token with:
|
||||
|
||||
```sh
|
||||
kubectl -n <NAMESPACE> get secret $(kubectl -n <NAMESPACE> get sa <SERVICE_ACCOUNT_NAME> -o=json \
|
||||
| jq -r '.secrets[0].name') -o=json \
|
||||
| jq -r '.data["token"]' \
|
||||
| base64 --decode \
|
||||
| pbcopy
|
||||
```
|
||||
|
||||
### Role Based Access Control
|
||||
|
||||
|
||||
Reference in New Issue
Block a user