98 lines
2.6 KiB
YAML
98 lines
2.6 KiB
YAML
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: prometheus-node-exporter
|
|
namespace: monitoring
|
|
labels:
|
|
app.kubernetes.io/name: prometheus
|
|
app.kubernetes.io/component: node-exporter
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
labels:
|
|
app.kubernetes.io/name: prometheus
|
|
app.kubernetes.io/component: node-exporter
|
|
name: prometheus-node-exporter
|
|
namespace: monitoring
|
|
spec:
|
|
clusterIP: None
|
|
ports:
|
|
- name: metrics
|
|
port: 9100
|
|
protocol: TCP
|
|
targetPort: 9100
|
|
selector:
|
|
app.kubernetes.io/name: prometheus
|
|
app.kubernetes.io/component: node-exporter
|
|
type: "ClusterIP"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: prometheus
|
|
app.kubernetes.io/component: node-exporter
|
|
name: prometheus-node-exporter
|
|
namespace: monitoring
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: prometheus
|
|
app.kubernetes.io/component: node-exporter
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: prometheus
|
|
app.kubernetes.io/component: node-exporter
|
|
spec:
|
|
serviceAccountName: prometheus-node-exporter
|
|
containers:
|
|
- name: prometheus-node-exporter
|
|
image: "prom/node-exporter:v1.7.0"
|
|
imagePullPolicy: "IfNotPresent"
|
|
args:
|
|
- --path.procfs=/host/proc
|
|
- --path.sysfs=/host/sys
|
|
- --no-collector.wifi
|
|
- --no-collector.hwmon
|
|
- --no-collector.netclass
|
|
- --no-collector.arp
|
|
- --no-collector.bcache
|
|
- --no-collector.bonding
|
|
- --no-collector.btrfs
|
|
- --no-collector.dmi
|
|
- --no-collector.edac
|
|
- --no-collector.entropy
|
|
- --no-collector.fibrechannel
|
|
- --no-collector.infiniband
|
|
- --no-collector.tapestats
|
|
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
|
|
- --web.listen-address=:9100
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 9100
|
|
hostPort: 9100
|
|
volumeMounts:
|
|
- name: proc
|
|
mountPath: /host/proc
|
|
readOnly: true
|
|
- name: sys
|
|
mountPath: /host/sys
|
|
readOnly: true
|
|
hostNetwork: true
|
|
hostPID: true
|
|
volumes:
|
|
- name: proc
|
|
hostPath:
|
|
path: /proc
|
|
- name: sys
|
|
hostPath:
|
|
path: /sys
|
|
---
|