66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: node-exporter
|
|
namespace: kube-monitoring
|
|
labels:
|
|
app.kubernetes.io/name: node-exporter
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: node-exporter
|
|
template:
|
|
metadata:
|
|
name: node-exporter
|
|
labels:
|
|
app.kubernetes.io/name: node-exporter
|
|
spec:
|
|
hostNetwork: true
|
|
hostPID: true
|
|
containers:
|
|
- name: node-exporter
|
|
image: prom/node-exporter
|
|
args:
|
|
- "--path.procfs=/host/proc"
|
|
- "--path.sysfs=/host/sys"
|
|
ports:
|
|
- containerPort: 9100
|
|
name: http-metrics
|
|
resources:
|
|
requests:
|
|
memory: 20Mi
|
|
cpu: 100m
|
|
limits:
|
|
memory: 50Mi
|
|
cpu: 500m
|
|
volumeMounts:
|
|
- name: proc
|
|
readOnly: true
|
|
mountPath: /host/proc
|
|
- name: sys
|
|
readOnly: true
|
|
mountPath: /host/sys
|
|
tolerations:
|
|
- effect: NoSchedule
|
|
operator: Exists
|
|
volumes:
|
|
- name: proc
|
|
hostPath:
|
|
path: /proc
|
|
- name: sys
|
|
hostPath:
|
|
path: /sys
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: nodes-exporter
|
|
labels:
|
|
app.kubernetes.io/name: node-exporter
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: node-exporter
|
|
ports:
|
|
- name: http-metrics
|
|
port: 9100
|
|
targetPort: http-metrics |