mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-30 17:51:35 +02:00
Enable kube-proxy metrics and allow Prometheus scrapes
* Configure kube-proxy --metrics-bind-address=0.0.0.0 (default 127.0.0.1) to serve metrics on 0.0.0.0:10249 * Add firewall rules to allow Prometheus (resides on a worker) to scrape kube-proxy service endpoints on controllers or workers * Add a clusterIP: None service for kube-proxy endpoint discovery
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
# Allow Prometheus to scrape service endpoints
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@ -7,7 +8,6 @@ metadata:
|
||||
prometheus.io/scrape: 'true'
|
||||
spec:
|
||||
type: ClusterIP
|
||||
# service is created to allow prometheus to scrape endpoints
|
||||
clusterIP: None
|
||||
selector:
|
||||
k8s-app: kube-controller-manager
|
||||
|
19
addons/prometheus/discovery/kube-proxy.yaml
Normal file
19
addons/prometheus/discovery/kube-proxy.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
# Allow Prometheus to scrape service endpoints
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kube-proxy
|
||||
namespace: kube-system
|
||||
annotations:
|
||||
prometheus.io/scrape: 'true'
|
||||
prometheus.io/port: '10249'
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
selector:
|
||||
k8s-app: kube-proxy
|
||||
ports:
|
||||
- name: metrics
|
||||
protocol: TCP
|
||||
port: 10249
|
||||
targetPort: 10249
|
@ -1,3 +1,4 @@
|
||||
# Allow Prometheus to scrape service endpoints
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@ -7,7 +8,6 @@ metadata:
|
||||
prometheus.io/scrape: 'true'
|
||||
spec:
|
||||
type: ClusterIP
|
||||
# service is created to allow prometheus to scrape endpoints
|
||||
clusterIP: None
|
||||
selector:
|
||||
k8s-app: kube-scheduler
|
||||
|
Reference in New Issue
Block a user