diff --git a/docs/api/workflows/kubeconfigs.md b/docs/api/workflows/kubeconfigs.md index 4170f2b5e8b..9e6a4f0e024 100644 --- a/docs/api/workflows/kubeconfigs.md +++ b/docs/api/workflows/kubeconfigs.md @@ -6,6 +6,18 @@ title: Kubeconfigs +## 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. + +```sh +kubectl api-resources --api-group=ext.cattle.io +``` + +```sh +kubectl explain kubeconfigs.ext.cattle.io +``` + ## Feature Flag The Kubeconfigs Public API is available since Rancher v2.12.0 and is enabled by default. It can be disabled by setting the `ext-kubeconfigs` feature flag to `false`. @@ -27,7 +39,7 @@ EOF Error from server (Forbidden): error when creating "STDIN": kubeconfigs.ext.cattle.io is forbidden: user system:admin is not a Rancher user ``` -:::note Important: +:::warning Important: The kubeconfig content is generated and returned in the `.status.value` field **only once** when the Kubeconfig is successfully created because it contains secret values for created tokens. Therefore it has to be captured by using an appropriate output options, such as `-o jsonpath='{.status.value}'` or `-o yaml`. diff --git a/shared-files/_glossary.md b/shared-files/_glossary.md index 45d0e6d73fc..b557f00518f 100644 --- a/shared-files/_glossary.md +++ b/shared-files/_glossary.md @@ -159,6 +159,21 @@
Related terms: RKE, RKE2
++ Versions: Rancher v2.12.0 and later +
+kubeconfigs.ext.cattle.io used to generate kubeconfigs.
+ kubectl or other clients. The kubeconfig contents can be generated by creating a Kubeconfig resource.
+