kubelet_volume_* 指标未显示所有 PVC

kubelet_volume_* 指标未显示所有 PVC

我使用 Prometheus 来监控我的 Kubernetes 集群。我有 42 个 PVC 绑定到 42 个 PV。出于某种原因,kubelet_volume_*只返回其中 29 个的信息。我到处找,但找不到指标为什么会这样。

kubelet_volume_stats_capacity_bytes{endpoint="https-metrics", instance="192.168.***.***:10250", job="kubelet", metrics_path="/metrics", namespace="prod-dk", node="ip-192-168-***-***.ec2.internal", persistentvolumeclaim="datadir-consul-0", service="prometheus-stack-kube-prom-kubelet"}

以下是 PVC 描述的示例,出现在度量标准中:

Name:          datadir-consul-0
Namespace:     prod-dk
StorageClass:  aws-ebs-us-east-1a
Status:        Bound
Volume:        pvc-e064c7fd-951d-41fb-96c4-*****
Labels:        app=consul
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
               volume.alpha.kubernetes.io/storage-class: anything
               volume.beta.kubernetes.io/storage-provisioner: ebs.csi.aws.com
               volume.kubernetes.io/storage-provisioner: ebs.csi.aws.com
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       consul-0
Events:        <none>

及其绑定的 PV:

Name:              pvc-e064c7fd-951d-41fb-96c4-*****
Labels:            <none>
Annotations:       pv.kubernetes.io/provisioned-by: ebs.csi.aws.com
                   volume.kubernetes.io/provisioner-deletion-secret-name: 
                   volume.kubernetes.io/provisioner-deletion-secret-namespace: 
Finalizers:        [kubernetes.io/pv-protection external-attacher/ebs-csi-aws-com]
StorageClass:      aws-ebs-us-east-1a
Status:            Bound
Claim:             prod-dk/datadir-consul-0
Reclaim Policy:    Retain
Access Modes:      RWO
VolumeMode:        Filesystem
Capacity:          1Gi
Node Affinity:     
  Required Terms:  
    Term 0:        topology.ebs.csi.aws.com/zone in [us-east-1a]
Message:           
Source:
    Type:              CSI (a Container Storage Interface (CSI) volume source)
    Driver:            ebs.csi.aws.com
    FSType:            ext4
    VolumeHandle:      vol-08fd7d663f34*****
    ReadOnly:          false
    VolumeAttributes:      storage.kubernetes.io/csiProvisionerIdentity=16980590*****-3114-ebs.csi.aws.com
Events:                <none>

以下是 PVC 描述的示例没有出现在度量标准中:

Name:          datadir-redis-cluster-0
Namespace:     redis
StorageClass:  aws-ebs-us-east-1a
Status:        Bound
Volume:        pvc-6d47c2d3-0bd5-46f0-96e6-30b7276*****
Labels:        app=redis-cluster
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
               volume.beta.kubernetes.io/storage-provisioner: ebs.csi.aws.com
               volume.kubernetes.io/storage-provisioner: ebs.csi.aws.com
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      10Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       redis-cluster-0
Events:        <none>

及其绑定的 PV:

Name:              pvc-6d47c2d3-0bd5-46f0-96e6-30b7276*****
Labels:            <none>
Annotations:       pv.kubernetes.io/provisioned-by: ebs.csi.aws.com
                   volume.kubernetes.io/provisioner-deletion-secret-name: 
                   volume.kubernetes.io/provisioner-deletion-secret-namespace: 
Finalizers:        [kubernetes.io/pv-protection external-attacher/ebs-csi-aws-com]
StorageClass:      aws-ebs-us-east-1a
Status:            Bound
Claim:             redis/datadir-redis-cluster-0
Reclaim Policy:    Retain
Access Modes:      RWO
VolumeMode:        Filesystem
Capacity:          10Gi
Node Affinity:     
  Required Terms:  
    Term 0:        topology.ebs.csi.aws.com/zone in [us-east-1a]
Message:           
Source:
    Type:              CSI (a Container Storage Interface (CSI) volume source)
    Driver:            ebs.csi.aws.com
    FSType:            ext4
    VolumeHandle:      vol-07f85d31ee39*****
    ReadOnly:          false
    VolumeAttributes:      storage.kubernetes.io/csiProvisionerIdentity=17093305*****-7119-ebs.csi.aws.com
Events:                <none>

相关内容