76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: exporter
|
|
app.kubernetes.io/name: node-exporter
|
|
name: node-exporter
|
|
namespace: monitoring
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: exporter
|
|
app.kubernetes.io/name: node-exporter
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: exporter
|
|
app.kubernetes.io/name: node-exporter
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- --path.sysfs=/host/sys
|
|
- --path.rootfs=/host/root
|
|
- --no-collector.wifi
|
|
- --no-collector.hwmon
|
|
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
|
|
- --collector.netclass.ignored-devices=^(veth.*)$
|
|
name: node-exporter
|
|
image: prom/node-exporter
|
|
ports:
|
|
- containerPort: 9100
|
|
protocol: TCP
|
|
resources:
|
|
limits:
|
|
cpu: 250m
|
|
memory: 180Mi
|
|
requests:
|
|
cpu: 102m
|
|
memory: 180Mi
|
|
volumeMounts:
|
|
- mountPath: /host/sys
|
|
mountPropagation: HostToContainer
|
|
name: sys
|
|
readOnly: true
|
|
- mountPath: /host/root
|
|
mountPropagation: HostToContainer
|
|
name: root
|
|
readOnly: true
|
|
volumes:
|
|
- hostPath:
|
|
path: /sys
|
|
name: sys
|
|
- hostPath:
|
|
path: /
|
|
name: root
|
|
|
|
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: node-exporter
|
|
namespace: monitoring
|
|
annotations:
|
|
prometheus.io/scrape: 'true'
|
|
prometheus.io/port: '9100'
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/component: exporter
|
|
app.kubernetes.io/name: node-exporter
|
|
ports:
|
|
- name: node-exporter
|
|
protocol: TCP
|
|
port: 9100
|
|
targetPort: 9100
|