未完成的节点导出器盒的Prometheus错误在哪里?

问题描述 投票:1回答:1

安装普罗米修斯:

helm install --name promeks --set server.persistentVolume.storageClass=gp2 stable/prometheus

仅创建了7个节点导出器窗格,但有22个节点。

$ kubectl get ds promeks-prometheus-node-exporter

NAME                               DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
promeks-prometheus-node-exporter   22        7         7         7            7           <none>          11d

$ kubectl describe ds promeks-prometheus-node-exporter

$ kubectl describe ds promeks-prometheus-node-exporter
Name:           promeks-prometheus-node-exporter
Selector:       app=prometheus,component=node-exporter,release=promeks
Node-Selector:  <none>
Labels:         app=prometheus
                chart=prometheus-7.0.2
                component=node-exporter
                heritage=Tiller
                release=promeks
Annotations:    <none>
Desired Number of Nodes Scheduled: 22
Current Number of Nodes Scheduled: 20
Number of Nodes Scheduled with Up-to-date Pods: 20
Number of Nodes Scheduled with Available Pods: 20
Number of Nodes Misscheduled: 0
Pods Status:  20 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           app=prometheus
                    component=node-exporter
                    release=promeks
  Service Account:  promeks-prometheus-node-exporter
  Containers:
   prometheus-node-exporter:
    Image:      prom/node-exporter:v0.16.0
    Port:       9100/TCP
    Host Port:  9100/TCP
    Args:
      --path.procfs=/host/proc
      --path.sysfs=/host/sys
    Environment:  <none>
    Mounts:
      /host/proc from proc (ro)
      /host/sys from sys (ro)
  Volumes:
   proc:
    Type:          HostPath (bare host directory volume)
    Path:          /proc
    HostPathType:
   sys:
    Type:          HostPath (bare host directory volume)
    Path:          /sys
    HostPathType:
Events:            <none>

我会在哪个Prometheus pod中找到日志或事件,抱怨15个吊舱无法安排?

kubernetes prometheus kubernetes-helm amazon-eks aws-eks
1个回答
1
投票

我能够重新创建您的问题,但不确定根本原因是否相同。

1)您可以从整个群集中获取所有事件

kubeclt get events

在你拥有22个节点的情况下,如果你使用grep会更好

kubectl get events | grep Warning

要么

kubectl get events | grep daemonset-controller

2)SSH到没有pod的节点。使用命令

docker ps -a

从条目中找到CONTAINER ID,其中NAMES包含节点名称。

docker inspect <ContainerID>

您将获得有关容器的大量信息,这可能有助于您定义失败的原因。

在我的情况下,我遇到了PersistentVolumeClaim(没有gp2存储类)和CPU资源不足的问题。

存储类可以通过获取

kubectl get storageclass
© www.soinside.com 2019 - 2024. All rights reserved.