[New feature] Added Prometheus example for metrics

This commit is contained in:
AquoDev 2020-11-09 09:07:15 +01:00
parent 40d1204906
commit ca6ef7e77c
No known key found for this signature in database
GPG Key ID: 27C4524C2511DF26
3 changed files with 49 additions and 0 deletions

3
prometheus/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM prom/prometheus
COPY prometheus.yml /etc/prometheus

36
prometheus/daemonset.yml Normal file
View File

@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: prometheus
namespace: default
labels:
name: prometheus
spec:
selector:
matchLabels:
name: prometheus
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 10%
template:
metadata:
labels:
name: prometheus
spec:
dnsPolicy: ClusterFirst
hostNetwork: true
containers:
- name: prometheus
image: prometheus-zevenet
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9090
resources:
limits:
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
securityContext:
privileged: true

10
prometheus/prometheus.yml Normal file
View File

@ -0,0 +1,10 @@
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
scrape_configs:
- job_name: kube-nftlb
scrape_interval: 1s
static_configs:
- targets:
- localhost:9195