kind: Service apiVersion: v1 metadata: name: air-quality-external namespace: monitoring labels: app: air-quality-external spec: type: ClusterIP ports: - name: metrics port: 80 targetPort: 80 --- kind: Endpoints apiVersion: v1 metadata: name: air-quality-external namespace: monitoring subsets: - addresses: - ip: 192.168.1.10 ports: - name: metrics port: 80 --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: air-quality-external namespace: monitoring labels: release: kube-prometheus-stack spec: selector: matchLabels: app: air-quality-external endpoints: - port: metrics interval: 60s scrapeTimeout: 15s path: /metrics