Prometheus Operator Concepts: Difference between revisions
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
=Custom Resources= | =Custom Resources= | ||
==Prometheus Resource== | ==Prometheus Resource== | ||
The Prometheus resource declares a "serviceMonitorSelector": | |||
<syntaxhighlight lang='yaml'> | |||
apiVersion: monitoring.coreos.com/v1 | |||
kind: Prometheus | |||
... | |||
spec: | |||
serviceMonitorSelector: | |||
matchLabels: | |||
release: prometheus | |||
</syntaxhighlight> | |||
==ServiceMonitor Resource== | ==ServiceMonitor Resource== | ||
The current service monitor list can be obtained with: | The current service monitor list can be obtained with: |
Revision as of 22:08, 14 October 2020
Internal
Custom Resources
Prometheus Resource
The Prometheus resource declares a "serviceMonitorSelector":
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
...
spec:
serviceMonitorSelector:
matchLabels:
release: prometheus
ServiceMonitor Resource
The current service monitor list can be obtained with:
kubectl -n <namespace> get servicemonitors