Starting with Kubernetes 1.6 `kubectl apply` works for TPRs so we can start using it, therefore using multiple files is no issue.
24 lines
511 B
YAML
24 lines
511 B
YAML
apiVersion: monitoring.coreos.com/v1alpha1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: k8s-apps-http
|
|
namespace: monitoring
|
|
labels:
|
|
k8s-apps: http
|
|
spec:
|
|
jobLabel: k8s-app
|
|
selector:
|
|
matchExpressions:
|
|
- {key: k8s-app, operator: Exists}
|
|
- {key: k8s-app, operator: NotIn, values: [kubelet]}
|
|
namespaceSelector:
|
|
matchNames:
|
|
- kube-system
|
|
endpoints:
|
|
- port: http-metrics
|
|
interval: 15s
|
|
- port: http-metrics-dnsmasq
|
|
interval: 15s
|
|
- port: http-metrics-skydns
|
|
interval: 15s
|