use ServiceMonitors to generate Prometheus Kubernetes config

This commit is contained in:
Frederic Branczyk
2016-12-14 17:48:54 -08:00
parent d93a9adadc
commit d4b581fa49
18 changed files with 103 additions and 242 deletions

View File

@@ -1,11 +1,14 @@
apiVersion: monitoring.coreos.com/v1alpha1
kind: Prometheus
metadata:
name: prometheus-k8s
name: k8s
labels:
prometheus: k8s
spec:
version: v1.4.1
version: v1.5.2
serviceMonitorSelector:
matchExpression:
- {key: k8s-apps, operator: Exists}
resources:
requests:
# 2Gi is default, but won't schedule if you don't have a node with >2Gi
@@ -13,3 +16,8 @@ spec:
# production use. This value is mainly meant for demonstration/testing
# purposes.
memory: 400Mi
alerting:
alertmanagers:
- namespace: monitoring
name: alertmanager-main
port: web