mirror of
https://github.com/Expand-sys/awx-on-k3s
synced 2025-12-16 05:52:15 +11:00
Merge pull request #117 from kurokobo/backup-ansible
fix: add description for the way to obtain token for sa
This commit is contained in:
commit
33b3c9cfe4
1 changed files with 5 additions and 2 deletions
|
|
@ -58,11 +58,14 @@ rolebinding.rbac.authorization.k8s.io/awx-backup created
|
|||
Obtain the API Token which required to authenticate the Kubernetes API. This token will be used later.
|
||||
|
||||
```bash
|
||||
# Kubernetes 1.24 or later
|
||||
# For Kubernetes 1.24 or later:
|
||||
# This will generate new token that valid for 87600 hours (10 years).
|
||||
# Of course you can modify the value since "87600h" is just an example.
|
||||
$ kubectl -n awx create token awx-backup --duration=87600h
|
||||
eyJhbGciOiJSUzI...hcGsPI5MzmaMHQvw
|
||||
|
||||
# Kubernetes 1.23 or earlier
|
||||
# For Kubernetes 1.23 or earlier:
|
||||
# Obtain and decode token from Secret that automatically generated for the Service Account.
|
||||
$ SECRET=$(kubectl -n ${NAMESPACE} get sa awx-backup -o jsonpath='{.secrets[0].name}')
|
||||
$ kubectl -n ${NAMESPACE} get secret ${SECRET} -o jsonpath='{.data.token}' | base64 -d
|
||||
eyJhbGciOiJSUzI...hcGsPI5MzmaMHQvw
|
||||
|
|
|
|||
Loading…
Reference in a new issue