apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: # The name of the service monitor name: test-servicemonitor # The namespace it will be in namespace: mobene-nsodev labels: # How to find this service monitor # The name I should use in `serviceMonitorSelector` name: test-servicemonitor release: kube-prometheus-stack spec: endpoints: - interval: 5s port: metrics path: /metrics # The namespace of origin service namespaceSelector: matchNames: - mobene-nsodev selector: matchLabels: # Where the monitor will attach to name: test-monitor-service