manifests/k8s: add service for discovering kube-dns metrics
The ports reflect the upstream kube-dns manifests of bootkube and kubernetes/kubernetes.
This commit is contained in:
@@ -65,4 +65,4 @@ scrape_configs:
|
||||
regex: "kube-(.*)-prometheus-discovery"
|
||||
- action: keep
|
||||
source_labels: [__meta_kubernetes_endpoint_port_name]
|
||||
regex: "prometheus"
|
||||
regex: "prometheus.*"
|
||||
|
20
manifests/k8s/kube-dns-bootkube-vagrant-multi.yaml
Normal file
20
manifests/k8s/kube-dns-bootkube-vagrant-multi.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kube-dns-prometheus-discovery
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kube-dns
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: prometheus-skydns
|
||||
port: 10055
|
||||
targetPort: 10055
|
||||
protocol: TCP
|
||||
- name: prometheus-dnsmasq
|
||||
port: 10054
|
||||
targetPort: 10054
|
||||
protocol: TCP
|
@@ -68,7 +68,7 @@ data:
|
||||
regex: "kube-(.*)-prometheus-discovery"
|
||||
- action: keep
|
||||
source_labels: [__meta_kubernetes_endpoint_port_name]
|
||||
regex: "prometheus"
|
||||
regex: "prometheus.*"
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
|
Reference in New Issue
Block a user