Files
kube-prometheus/manifests/k8s/minikube/kube-controller-manager.yaml
eedugon 3238ba257a small changes in k8s/minikube and example-app (#392)
* namespace has to be kube-system

In order for this service to be discovered by ServiceMonitor k8s-apps-http, it should belong to namespace kube-system.

* namespace has to be kube-system

* namespace has to be kube-system

for service discovery to work within prometheus configuration (ServiceMonitor k8s-app) these service and endpoints should belong to kube-system namespace. Otherwise the service monitor won't fetch it.

* selector was incorrect

selector prometheus: prometheus-frontend is incorrect, the name of the Prometheus resource in the example is "frontend", not "prometheus-frontend"
2017-05-31 11:55:56 -07:00

31 lines
572 B
YAML

apiVersion: v1
kind: Service
metadata:
namespace: kube-system
name: kube-controller-manager-prometheus-discovery
labels:
k8s-app: kube-controller-manager
spec:
type: ClusterIP
clusterIP: None
ports:
- name: http-metrics
port: 10252
targetPort: 10252
protocol: TCP
---
apiVersion: v1
kind: Endpoints
metadata:
namespace: kube-system
name: kube-controller-manager-prometheus-discovery
labels:
k8s-app: kube-controller-manager
subsets:
- addresses:
- ip: MINIKUBE_IP
ports:
- name: http-metrics
port: 10252
protocol: TCP