mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-27 21:50:21 +00:00
address comments, tab indentation
This commit is contained in:
@@ -34,25 +34,25 @@ A Token is always created for the user making the request. Attempting to create
|
|||||||
|
|
||||||
- The `metadata.name` and `metadata.generateName` fields are ignored and the name of the new Token is automatically generated using the prefix `token-`.
|
- The `metadata.name` and `metadata.generateName` fields are ignored and the name of the new Token is automatically generated using the prefix `token-`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl create -o jsonpath='{.status.value}' -f -<<EOF
|
kubectl create -o jsonpath='{.status.value}' -f -<<EOF
|
||||||
apiVersion: ext.cattle.io/v1
|
apiVersion: ext.cattle.io/v1
|
||||||
kind: Token
|
kind: Token
|
||||||
spec:
|
spec:
|
||||||
description: My Token
|
description: My Token
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
- If the `spec.ttl` is not specified, the Token will be created with the expiration time defined in the `auth-token-max-ttl-minutes` setting. This is 90 days by default. If `spec.ttl` is specified, it should be greater than 0 and less than or equal to the value of the `auth-token-max-ttl-minutes` setting expressed in milliseconds.
|
- If the `spec.ttl` is not specified, the Token will be created with the expiration time defined in the `auth-token-max-ttl-minutes` setting. This is 90 days by default. If `spec.ttl` is specified, it should be greater than 0 and less than or equal to the value of the `auth-token-max-ttl-minutes` setting expressed in milliseconds.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl create -o jsonpath='{.status.value}' -f -<<EOF
|
kubectl create -o jsonpath='{.status.value}' -f -<<EOF
|
||||||
apiVersion: ext.cattle.io/v1
|
apiVersion: ext.cattle.io/v1
|
||||||
kind: Token
|
kind: Token
|
||||||
spec:
|
spec:
|
||||||
ttl: 7200000 # 2 hours
|
ttl: 7200000 # 2 hours
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
## Listing Tokens
|
## Listing Tokens
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user