004-node-exporter.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. kind: DaemonSet
  2. apiVersion: apps/v1
  3. metadata:
  4. name: node-exporter
  5. namespace: monitoring
  6. spec:
  7. selector:
  8. matchLabels:
  9. daemon: node-exporter
  10. grafanak8sapp: "true"
  11. template:
  12. metadata:
  13. name: node-exporter
  14. labels:
  15. daemon: node-exporter
  16. grafanak8sapp: "true"
  17. spec:
  18. volumes:
  19. - name: proc
  20. hostPath:
  21. path: /proc
  22. - name: sys
  23. hostPath:
  24. path: /sys
  25. containers:
  26. - name: node-exporter
  27. image: quay.io/prometheus/node-exporter:v0.15.0
  28. args:
  29. - --path.procfs=/proc_host
  30. - --path.sysfs=/host_sys
  31. ports:
  32. - name: node-exporter
  33. hostPort: 9100
  34. containerPort: 9100
  35. volumeMounts:
  36. - name: sys
  37. readOnly: true
  38. mountPath: /host_sys
  39. - name: proc
  40. readOnly: true
  41. mountPath: /proc_host
  42. imagePullPolicy: IfNotPresent
  43. restartPolicy: Always
  44. hostNetwork: true
  45. hostPID: true