安装了Prometheus,其中包括:
helm install --name promeks --set server.persistentVolume.storageClass=gp2 stable/prometheus
只创建了7个node-exporter pod,但有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个pod无法调度的日志或事件?
发布于 2019-04-10 19:31:42
我能够重现你的问题,但是不确定根本原因是否相同。
1)可以获取整个集群的所有事件
kubeclt get events在有22个节点的情况下,如果使用grep会更好
kubectl get events | grep Warning或
kubectl get events | grep daemonset-controller2) SSH到不带pod的节点。使用命令
docker ps -a从名称包含节点名的条目中查找容器ID。
docker inspect <ContainerID>您将获得许多关于容器的信息,这些信息可能会帮助您确定它失败的原因。
在我的例子中,我遇到了PersistentVolumeClaim (没有gp2存储类)和资源不足的问题。
存储类可以通过以下方式获得
kubectl get storageclasshttps://stackoverflow.com/questions/55583543
复制相似问题