kube-state-metrics icon indicating copy to clipboard operation
kube-state-metrics copied to clipboard

feat: #2501 Count volumes attached to a node

Open LiuQhahah opened this issue 1 month ago • 2 comments

What this PR does / why we need it:

Count volumes attached to a node

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)

increaser two metrics: kube_node_volumes_attached_count and kube_node_volumes_in_use_count

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #2501

LiuQhahah avatar Nov 17 '25 01:11 LiuQhahah

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

k8s-ci-robot avatar Nov 17 '25 01:11 k8s-ci-robot

/triage accepted /assign

dgrisonnet avatar Dec 12 '25 15:12 dgrisonnet

Would you mind sharing the use case of this?

CatherineF-dev avatar Dec 17 '25 18:12 CatherineF-dev

Would you mind sharing the use case of this?

TLDR: The number of volumes that can be attached to a Node is hard-limited for different hosting providers and thus should be monitored and alerted when approaching the limit.

https://github.com/kubernetes/kube-state-metrics/issues/2501

thommeo avatar Dec 18 '25 12:12 thommeo