apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: app: nginx name: nginx namespace: monitoring spec: endpoints: - interval: 30s port: prometheus relabelings: - action: replace regex: (.*) replacement: $1 sourceLabels: - __meta_kubernetes_pod_node_name targetLabel: instance scheme: http jobLabel: nginx-exporter namespaceSelector: matchNames: - ingress-nginx selector: matchLabels: app.kubernetes.io/name: ingress-nginx