Skip to content

Document Metrics API in observability concepts - #56956

Open
tico88612 wants to merge 2 commits into
kubernetes:dev-1.37from
tico88612:feat/metrics-api-addition
Open

Document Metrics API in observability concepts#56956
tico88612 wants to merge 2 commits into
kubernetes:dev-1.37from
tico88612:feat/metrics-api-addition

Conversation

@tico88612

@tico88612 tico88612 commented Aug 12, 2026

Copy link
Copy Markdown
Member

Description

Add the Metrics API documentation to the concepts page.

#56349 has been merged and marked as Tracked for Docs Freeze, but the SIG Docs reviewers would like to add more to the concept section, so I've opened this PR.

Please let me know if I need to attach a Docs Freeze Exception or follow any other procedures.

Some content uses AI assistance. But I did a preliminary check.

Issue

Related #56895

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
@kubernetes-prow kubernetes-prow Bot added this to the 1.37 milestone Aug 12, 2026
@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

Name Link
🔨 Latest commit 4b3a025
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-vnext-staging/deploys/6a7d3c3a356414000817c00b

@kubernetes-prow kubernetes-prow Bot added the language/en Issues or PRs related to English language label Aug 12, 2026
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 12, 2026
@tico88612

Copy link
Copy Markdown
Member Author

/cc @lmktfy

@kubernetes-prow
kubernetes-prow Bot requested a review from lmktfy August 12, 2026 16:44
@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 4b3a025
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/6a7d3c381c7c4b0008855bde
😎 Deploy Preview https://deploy-preview-56956--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@tico88612

Copy link
Copy Markdown
Member Author

cc @kernel-kun

@lmktfy lmktfy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I actually recommend a slight simplification – see inline feedback.


### Metrics API

{{< feature-state for_k8s_version="v1.37" state="stable" >}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only kind of true, I think. Could you install the v1 API into a v1.36 cluster? I think you could.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although metrics.k8s.io/v1 was introduced with Kubernetes v1.37, an independent aggregated API provider could technically serve it on an older cluster.

I removed the feature-state notice to avoid implying that v1.37 is a hard minimum cluster version.

and [VerticalPodAutoscaler](/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/)
use this API.

`kubectl top` supports both `metrics.k8s.io/v1` and `metrics.k8s.io/v1beta1`. It prefers `v1`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For simplicity, just skip this paragraph (for now). Easier to get a stub merged than a more detailed page / section perfect.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I removed this paragraph to keep the initial Metrics API section simple and focused on the concept.

metrics needed for autoscaling and basic inspection; it is not a replacement for a full monitoring
pipeline.

To learn about the API, its implementations, and the data flow from kubelets to its clients, see the

@lmktfy lmktfy Aug 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feedback is more than a nit, but given how close we are to the v1.37 release day, I don't want this feedback to block a merge.

This hyperlinking isn't quite right. If the current task page has some conceptual explanation, either move it here or copy it.

We shouldn't refer people to a task page as part of undertaking a concept; the audience for a task page is people who are moderately familiar with the concept already, and want to be walked through what to do.

(there is a separate idea of a tutorial page, but I doubt there is time to get one written)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, agreed. I added a concise explanation here that Metrics Server collects resource metrics from kubelets and makes them available through the Metrics API.

I also removed the task-page link so that this concept section is self-contained without significantly expanding the stub.

@dipesh-rawat

Copy link
Copy Markdown
Member

/hold

We are well past the Docs Freeze deadline. This will require a Docs Freeze exception to proceed.

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2026

@lmktfy lmktfy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the basis that

  1. overall, this change would improve the docs
  2. the PR is (correctly) held at the moment

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 12, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: fde673647e44496fd501e07f912b23b6e0b24dbc

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
@kubernetes-prow kubernetes-prow Bot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 13, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from lmktfy August 13, 2026 03:38
@kubernetes-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@kubernetes-prow kubernetes-prow Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 13, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lmktfy. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. language/en Issues or PRs related to English language size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants