apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: name: prometheus name: prometheus namespace: metrics spec: endpoints: - interval: 30s targetPort: 9090 path: /metrics - interval: 30s targetPort: 8080 path: /metrics namespaceSelector: any: true selector: matchLabels: prometheus.io/scrape: "true"