diff --git a/docs/api/api-reference.mdx b/docs/api/api-reference.mdx index d8674b6e14f..794b4ad9b91 100644 --- a/docs/api/api-reference.mdx +++ b/docs/api/api-reference.mdx @@ -2,6 +2,12 @@ title: API Reference --- +:::note + +At this time, not all Rancher resources are available through the Rancher Kubernetes API. + +::: + import ApiDocMdx from '@theme/ApiDocMdx'; \ No newline at end of file diff --git a/docs/api/quickstart.md b/docs/api/quickstart.md index 043b889a69d..a9acd862973 100644 --- a/docs/api/quickstart.md +++ b/docs/api/quickstart.md @@ -4,7 +4,7 @@ title: API Quick Start Guide You can access Rancher's resources through the Kubernetes API. This guide will help you get started on using this API as a Rancher user. -1. In the upper left corner, click **☰ > Global Settings**. +1. In the upper left corner, click **☰ > Global Settings**. 2. Find and copy the address in the `server-url` field. 3. [Create](../reference-guides/user-settings/api-keys.md#creating-an-api-key) a Rancher API key with no scope. @@ -38,7 +38,7 @@ You can access Rancher's resources through the Kubernetes API. This guide will h current-context: "rancher" ``` -You can use this file with any compatible tool, such as kubectl or [client-go](https://github.com/kubernetes/client-go). For a quick demo, see the [kubectl example](#api-kubectl-example). +You can use this file with any compatible tool, such as kubectl or [client-go](https://github.com/kubernetes/client-go). For a quick demo, see the [kubectl example](#api-kubectl-example). For more information on handling more complex certificate setups, see [Specifying CA Certs](#specifying-ca-certs). @@ -46,6 +46,14 @@ For more information on available kubeconfig options, see the [upstream document ## API kubectl Example +In this example, we'll show how to use kubectl to create a project, followed by deleting it. For a list of other Rancher resources available, refer to the [API Reference](./api-reference.mdx) page. + +:::note + +At this time, not all Rancher resources are available through the Rancher Kubernetes API. + +::: + 1. Set your KUBECONFIG environment variable to the kubeconfig file you just created: ```bash @@ -109,7 +117,7 @@ Not all resources may have detailed output. To ensure that your tools can recognize Rancher's CA certificates, most setups require additional modifications to the above template. -1. In the upper left corner, click **☰ > Global Settings**. +1. In the upper left corner, click **☰ > Global Settings**. 2. Find and copy the value in the `ca-certs` field. 3. Save the value in a file named `rancher.crt`. diff --git a/versioned_docs/version-2.8/api/api-reference.mdx b/versioned_docs/version-2.8/api/api-reference.mdx index d8674b6e14f..794b4ad9b91 100644 --- a/versioned_docs/version-2.8/api/api-reference.mdx +++ b/versioned_docs/version-2.8/api/api-reference.mdx @@ -2,6 +2,12 @@ title: API Reference --- +:::note + +At this time, not all Rancher resources are available through the Rancher Kubernetes API. + +::: + import ApiDocMdx from '@theme/ApiDocMdx'; \ No newline at end of file diff --git a/versioned_docs/version-2.8/api/quickstart.md b/versioned_docs/version-2.8/api/quickstart.md index 043b889a69d..a9acd862973 100644 --- a/versioned_docs/version-2.8/api/quickstart.md +++ b/versioned_docs/version-2.8/api/quickstart.md @@ -4,7 +4,7 @@ title: API Quick Start Guide You can access Rancher's resources through the Kubernetes API. This guide will help you get started on using this API as a Rancher user. -1. In the upper left corner, click **☰ > Global Settings**. +1. In the upper left corner, click **☰ > Global Settings**. 2. Find and copy the address in the `server-url` field. 3. [Create](../reference-guides/user-settings/api-keys.md#creating-an-api-key) a Rancher API key with no scope. @@ -38,7 +38,7 @@ You can access Rancher's resources through the Kubernetes API. This guide will h current-context: "rancher" ``` -You can use this file with any compatible tool, such as kubectl or [client-go](https://github.com/kubernetes/client-go). For a quick demo, see the [kubectl example](#api-kubectl-example). +You can use this file with any compatible tool, such as kubectl or [client-go](https://github.com/kubernetes/client-go). For a quick demo, see the [kubectl example](#api-kubectl-example). For more information on handling more complex certificate setups, see [Specifying CA Certs](#specifying-ca-certs). @@ -46,6 +46,14 @@ For more information on available kubeconfig options, see the [upstream document ## API kubectl Example +In this example, we'll show how to use kubectl to create a project, followed by deleting it. For a list of other Rancher resources available, refer to the [API Reference](./api-reference.mdx) page. + +:::note + +At this time, not all Rancher resources are available through the Rancher Kubernetes API. + +::: + 1. Set your KUBECONFIG environment variable to the kubeconfig file you just created: ```bash @@ -109,7 +117,7 @@ Not all resources may have detailed output. To ensure that your tools can recognize Rancher's CA certificates, most setups require additional modifications to the above template. -1. In the upper left corner, click **☰ > Global Settings**. +1. In the upper left corner, click **☰ > Global Settings**. 2. Find and copy the value in the `ca-certs` field. 3. Save the value in a file named `rancher.crt`.