Skip to content

Instantly share code, notes, and snippets.

@jayunit100
Created March 24, 2020 17:47
Show Gist options
  • Save jayunit100/55623a091cc171ab0ee04f5c17f3a69c to your computer and use it in GitHub Desktop.
Save jayunit100/55623a091cc171ab0ee04f5c17f3a69c to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/scrape: 'true'
labels:
name: prometheus
name: prometheus
spec:
selector:
app: prometheus
type: NodePort
ports:
- name: prometheus
protocol: TCP
port: 9090
targetPort: 9090
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prometheus
spec:
replicas: 1
selector:
matchLabels:
app: prometheus
template:
metadata:
name: prometheus
labels:
app: prometheus
spec:
containers:
- name: prometheus
image: prom/prometheus:v2.1.0
args:
- '--log.level=debug'
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/tmp/data/'
ports:
- name: web
containerPort: 9090
volumeMounts:
- name: data
mountPath: /data
- name: config-volume
mountPath: /etc/prometheus
volumes:
- name: data
emptyDir: {}
- name: config-volume
configMap:
name: prometheus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment