apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: metrics annotations: monitoring.edge.ncr.com/allowed-metrics: | gridbug_todo spec: selector: matchLabels: platform.edge.ncr.com/component: gridbug endpoints: - port: metrics --- apiVersion: v1 kind: Service metadata: name: gridbug-metrics spec: selector: platform.edge.ncr.com/component: gridbug ports: - name: metrics port: 8081