update readme about vts metrics
This commit is contained in:
parent
bb72a03bc2
commit
7dbde0b369
2 changed files with 23 additions and 1 deletions
|
@ -1,7 +1,11 @@
|
||||||
# Deploying the Nginx Ingress controller
|
# Deploying the Nginx Ingress controller
|
||||||
|
|
||||||
This example aims to demonstrate the deployment of an nginx ingress controller and
|
This example aims to demonstrate the deployment of an nginx ingress controller and
|
||||||
use a ConfigMap to enable nginx vts module and export metrics for prometheus.
|
use a ConfigMap to enable nginx vts module and export metrics for prometheus,to enable
|
||||||
|
vts metric,you can simply run `kubectl apply -f nginx`,a deployment and service will be
|
||||||
|
created which already has a `prometheus.io/scrap: 'true'` annotation and if you added
|
||||||
|
the recommended Prometheus service-endpoint scraping [configuration](https://raw.githubusercontent.com/prometheus/prometheus/master/documentation/examples/prometheus-kubernetes.yml),
|
||||||
|
Prometheus will scrape it automatically and you start using the generated metrics right away.
|
||||||
|
|
||||||
## Default Backend
|
## Default Backend
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: nginx-ingress-controller-service
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: nginx-ingress-controller-service
|
||||||
|
annotations:
|
||||||
|
prometheus.io/port: '10254'
|
||||||
|
prometheus.io/scrape: 'true'
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http-metrics
|
||||||
|
port: 8080
|
||||||
|
targetPort: 10254
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
k8s-app: nginx-ingress-controller
|
Loading…
Reference in a new issue