service-monitor.yaml 655 B

123456789101112131415161718192021222324252627
  1. apiVersion: monitoring.coreos.com/v1
  2. kind: ServiceMonitor
  3. metadata:
  4. labels:
  5. app.kubernetes.io/name: node-exporter
  6. name: node-exporter
  7. name: node-exporter
  8. namespace: monitoring
  9. spec:
  10. endpoints:
  11. - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
  12. interval: 15s
  13. port: https
  14. relabelings:
  15. - action: replace
  16. regex: (.*)
  17. replacement: $1
  18. sourceLabels:
  19. - __meta_kubernetes_pod_node_name
  20. targetLabel: instance
  21. scheme: https
  22. tlsConfig:
  23. insecureSkipVerify: true
  24. jobLabel: app.kubernetes.io/name
  25. selector:
  26. matchLabels:
  27. app.kubernetes.io/name: node-exporter