Closed yummydsky closed 1 month ago
This issue is currently awaiting triage.
If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Hello @yummydsky,
I can't reproduce your issue with either v2.10.1
or v2.12.0
(latest):
kube-state-metrics /metrics
kube_pod_spec_volumes_persistentvolumeclaims_info{namespace="default",pod="task-pv-pod",uid="317729a4-7dfa-4f53-8569-a3245e6a6e75",volume="task-pv-storage",persistentvolumeclaim="task-pv-claim"} 1
kube_pod_spec_volumes_persistentvolumeclaims_info{namespace="default",pod="task-pv-pod",uid="317729a4-7dfa-4f53-8569-a3245e6a6e75",volume="task-pv-storage-2",persistentvolumeclaim="task-pv-claim-2"} 1
PromQL
{namespace="default", persistentvolumeclaim="task-pv-claim", pod="task-pv-pod", volume="task-pv-storage"}
{namespace="default", persistentvolumeclaim="task-pv-claim-2", pod="task-pv-pod", volume="task-pv-storage-2"}
Kubernetes
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0
Any chance you could try a more recent version of Kubernetes? v1.21 reached End of Life 2022-06-28 [1]
[1] https://kubernetes.io/releases/patch-releases/#support-period
@ricardoapl Thanks for the quick reply. Yes, you're right. This is not a bug. That's my fault. It's my pod template issue, I just requested the volume but did not mount it to a specific folder, so the metric works as expected.
What happened: There are two volumes mounted on the same pod, but only the first volume can be found in kube-state-metrics.
But in Prometheus
--
What you expected to happen:
The metric
kube_pod_spec_volumes_persistentvolumeclaims_info
can report all the volumes mounted information not just first one.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):