mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-29 14:38:50 +00:00
Standardizing Tokens page with Kubeconfigs page and adding a caution for Token return values. Also cleaned up some spacing on Kubeconfigs page.
Signed-off-by: Sunil Singh <sunil.singh@suse.com>
This commit is contained in:
@@ -8,11 +8,12 @@ title: Kubeconfigs
|
|||||||
|
|
||||||
## Kubeconfig Resource
|
## Kubeconfig Resource
|
||||||
|
|
||||||
Kubeconfig is a Rancher resource `kubeconfigs.ext.cattle.io` that allows generating `v1.Config` kubeconfig files for interacting with Rancher and clusters managed by Rancher.
|
Kubeconfig is a Rancher resource `kubeconfigs.ext.cattle.io` that allows generating `v1.Config` kubeconfig files for interacting with Rancher and clusters managed by Rancher.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
kubectl api-resources --api-group=ext.cattle.io
|
kubectl api-resources --api-group=ext.cattle.io
|
||||||
```
|
```
|
||||||
|
|
||||||
To get a description of the fields and structure of the Kubeconfig resource, run:
|
To get a description of the fields and structure of the Kubeconfig resource, run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ title: Tokens
|
|||||||
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/api/workflows/tokens"/>
|
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/api/workflows/tokens"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
## Token Resource
|
||||||
|
|
||||||
|
Rancher has an imperative API resource `tokens.ext.cattle.io` that allows for generating tokens for authenticating with Rancher.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl api-resources --api-group=ext.cattle.io
|
||||||
|
```
|
||||||
|
|
||||||
|
To get a description of the fields and structure of the Token resource, run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl explain tokens.ext.cattle.io
|
||||||
|
```
|
||||||
|
|
||||||
## Feature Flag
|
## Feature Flag
|
||||||
|
|
||||||
The Tokens Public API is available for Rancher v2.12.0 and later, and is enabled by default. You can disable the Tokens Public API by setting the `ext-tokens` feature flag to `false` as shown in the example `kubectl` command below:
|
The Tokens Public API is available for Rancher v2.12.0 and later, and is enabled by default. You can disable the Tokens Public API by setting the `ext-tokens` feature flag to `false` as shown in the example `kubectl` command below:
|
||||||
@@ -16,6 +30,10 @@ kubectl patch feature ext-tokens -p '{"spec":{"value":false}}'
|
|||||||
|
|
||||||
## Creating a Token
|
## Creating a Token
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
The Token value is only returned once in the `status.value` field.
|
||||||
|
:::
|
||||||
|
|
||||||
Only a **valid and active** Rancher user can create a Token. Otherwise, you will get an error displayed (`Error from server (Forbidden)...`) when attempting to create a Token.
|
Only a **valid and active** Rancher user can create a Token. Otherwise, you will get an error displayed (`Error from server (Forbidden)...`) when attempting to create a Token.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ title: Kubeconfigs
|
|||||||
|
|
||||||
## Kubeconfig Resource
|
## Kubeconfig Resource
|
||||||
|
|
||||||
Kubeconfig is a Rancher resource `kubeconfigs.ext.cattle.io` that allows generating `v1.Config` kubeconfig files for interacting with Rancher and clusters managed by Rancher.
|
Kubeconfig is a Rancher resource `kubeconfigs.ext.cattle.io` that allows generating `v1.Config` kubeconfig files for interacting with Rancher and clusters managed by Rancher.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
kubectl api-resources --api-group=ext.cattle.io
|
kubectl api-resources --api-group=ext.cattle.io
|
||||||
```
|
```
|
||||||
|
|
||||||
To get a description of the fields and structure of the Kubeconfig resource, run:
|
To get a description of the fields and structure of the Kubeconfig resource, run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ title: Tokens
|
|||||||
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/api/workflows/tokens"/>
|
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/api/workflows/tokens"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
## Token Resource
|
||||||
|
|
||||||
|
Rancher has an imperative API resource `tokens.ext.cattle.io` that allows for generating tokens for authenticating with Rancher.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl api-resources --api-group=ext.cattle.io
|
||||||
|
```
|
||||||
|
|
||||||
|
To get a description of the fields and structure of the Token resource, run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl explain tokens.ext.cattle.io
|
||||||
|
```
|
||||||
|
|
||||||
## Feature Flag
|
## Feature Flag
|
||||||
|
|
||||||
The Tokens Public API is available for Rancher v2.12.0 and later, and is enabled by default. You can disable the Tokens Public API by setting the `ext-tokens` feature flag to `false` as shown in the example `kubectl` command below:
|
The Tokens Public API is available for Rancher v2.12.0 and later, and is enabled by default. You can disable the Tokens Public API by setting the `ext-tokens` feature flag to `false` as shown in the example `kubectl` command below:
|
||||||
@@ -16,6 +30,10 @@ kubectl patch feature ext-tokens -p '{"spec":{"value":false}}'
|
|||||||
|
|
||||||
## Creating a Token
|
## Creating a Token
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
The Token value is only returned once in the `status.value` field.
|
||||||
|
:::
|
||||||
|
|
||||||
Only a **valid and active** Rancher user can create a Token. Otherwise, you will get an error displayed (`Error from server (Forbidden)...`) when attempting to create a Token.
|
Only a **valid and active** Rancher user can create a Token. Otherwise, you will get an error displayed (`Error from server (Forbidden)...`) when attempting to create a Token.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user