Skip to content

Instantly share code, notes, and snippets.

@utkarshmani1997
Created September 11, 2017 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save utkarshmani1997/4384745a5d3b55a12a6ffc5bd2860114 to your computer and use it in GitHub Desktop.
Save utkarshmani1997/4384745a5d3b55a12a6ffc5bd2860114 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prometheus-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: prometheus-server
spec:
serviceAccountName: openebs-maya-operator
containers:
- name: prometheus
image: prom/prometheus:latest
args:
- "-config.file=/etc/prometheus/conf/prometheus.yml"
# Metrics are stored in an emptyDir volume which
# exists as long as the Pod is running on that Node.
# The data in an emptyDir volume is safe across container crashes.
- "-storage.local.path=/prometheus"
ports:
- containerPort: 9090
volumeMounts:
- name: prometheus-server-volume
mountPath: /etc/prometheus/conf
- name: prometheus-storage-volume
mountPath: /prometheus
volumes:
- name: prometheus-server-volume
configMap:
name: prometheus-config
- name: prometheus-storage-volume
emptyDir: {} # containers in the Pod can all read and write the same files here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment