Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KEP-3352] docs for aggregated discovery #45267

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions content/en/docs/concepts/overview/kubernetes-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,22 @@ separate endpoint for each group version.

### Aggregated discovery
sftim marked this conversation as resolved.
Show resolved Hide resolved

{{< feature-state state="beta" for_k8s_version="v1.27" >}}
{{< feature-state state="stable" for_k8s_version="v1.27" >}}
sftim marked this conversation as resolved.
Show resolved Hide resolved

Kubernetes offers beta support for aggregated discovery, publishing
Kubernetes offers stable support for aggregated discovery, publishing
Jefftree marked this conversation as resolved.
Show resolved Hide resolved
all resources supported by a cluster through two endpoints (`/api` and
`/apis`). Requesting this
endpoint drastically reduces the number of requests sent to fetch the
discovery data from the cluster. You can access the data by
requesting the respective endpoints with an `Accept` header indicating
the aggregated discovery resource:
`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`.
`Accept: application/json;v=v2;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`.

Without indicating the resource type using the `Accept` header, the default
response for the `/api` and `/apis` endpoint is an unaggregated discovery
document.

The [discovery document](https://github.com/kubernetes/kubernetes/blob/release-v{{< skew currentVersion >}}/api/discovery/aggregated_v2beta1.json)
The [discovery document](https://github.com/kubernetes/kubernetes/blob/release-v{{< skew currentVersion >}}/api/discovery/aggregated_v2.json)
for the built-in resources can be found in the Kubernetes GitHub repository.
This Github document can be used as a reference of the base set of the available resources
if a Kubernetes cluster is not available to query.
Expand Down Expand Up @@ -295,14 +295,14 @@ cluster.

Jefftree marked this conversation as resolved.
Show resolved Hide resolved
{{< feature-state feature_gate_name="AggregatedDiscoveryEndpoint" >}}

Kubernetes offers beta support for aggregated discovery, publishing
Kubernetes offers stable support for aggregated discovery, publishing
Jefftree marked this conversation as resolved.
Show resolved Hide resolved
all resources supported by a cluster through two endpoints (`/api` and
`/apis`) compared to one for every group version. Requesting this
endpoint drastically reduces the number of requests sent to fetch the
discovery for the average Kubernetes cluster. This may be accessed by
requesting the respective endpoints with an Accept header indicating
the aggregated discovery resource:
`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`.
`Accept: application/json;v=v2;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`.

The endpoint also supports ETag and protobuf encoding.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ stages:
- stage: beta
defaultValue: true
fromVersion: "1.27"
- stage: stable
defaultValue: true
fromVersion: "1.30"
sftim marked this conversation as resolved.
Show resolved Hide resolved
---
Enable a single HTTP endpoint `/discovery/<version>` which
supports native HTTP caching with ETags containing all APIResources known to the API server.