Skip to content

Instantly share code, notes, and snippets.

@gianrubio
Last active February 13, 2020 18:52
Show Gist options
  • Select an option

  • Save gianrubio/43be1b0360b6f7e4b4a368df900d5fc7 to your computer and use it in GitHub Desktop.

Select an option

Save gianrubio/43be1b0360b6f7e4b4a368df900d5fc7 to your computer and use it in GitHub Desktop.
serviceMonitor-example.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
namespaceSelector:
matchNames:
- default
endpoints:
- port: web
interval: 30s
@raonelakurti
Copy link

raonelakurti commented Feb 13, 2020

We have the monitoring namespace host the prom-operator and this namespace will serve the central cluster metrics.
And we want to build seperate instances of prometheus in each and every namespace and it will have a sepearte service montior.
Do you have any work around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment