通过以下方式安装了Prometheus:
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窗格中抱怨无法安排15个窗格的日志或事件?
答案 0 :(得分:1)
我能够重新创建您的问题,但是不确定根本原因是否相同。
1) 您可以从整个集群中获取所有事件
kubeclt get events
在您有22个节点的情况下,最好使用grep
kubectl get events | grep Warning
或
kubectl get events | grep daemonset-controller
2) SSH到没有Pod的节点。使用命令
docker ps -a
在包含节点名称的条目中找到容器ID。
docker inspect <ContainerID>
您将获得有关容器的大量信息,这可能有助于您确定容器失败的原因。
就我而言,我遇到了PersistentVolumeClaim问题(没有gp2存储类)并且CPU资源不足。
可以通过
获取存储类kubectl get storageclass