1. apiVersion: v1
    2. kind: Service
    3. metadata:
    4. name: other-node-exporter
    5. namespace: monitoring
    6. labels:
    7. k8s-app: node-exporter
    8. spec:
    9. type: ClusterIP
    10. clusterIP: None
    11. ports:
    12. - name: http
    13. port: 9100
    14. protocol: TCP
    15. ---
    16. apiVersion: v1
    17. kind: Endpoints
    18. metadata:
    19. name: other-node-exporter
    20. namespace: monitoring
    21. labels:
    22. k8s-app: node-exporter
    23. subsets:
    24. - addresses:
    25. - ip: 172.16.0.185
    26. - ip: 172.16.1.73
    27. ports:
    28. - name: http
    29. port: 9100
    30. protocol: TCP
    31. ---
    32. apiVersion: monitoring.coreos.com/v1
    33. kind: ServiceMonitor
    34. metadata:
    35. name: other-node-exporter
    36. namespace: monitoring
    37. labels:
    38. k8s-app: node-exporter
    39. chart: prometheus-operator-8.5.0
    40. heritage: Helm
    41. release: prometheus
    42. spec:
    43. jobLabel: k8s-app
    44. endpoints:
    45. - port: http
    46. interval: 30s
    47. scheme: http
    48. selector:
    49. matchLabels:
    50. k8s-app: node-exporter
    51. namespaceSelector:
    52. matchNames:
    53. - monitoring