Skip to content

Instantly share code, notes, and snippets.

@jeroenr
Created August 8, 2017 19:04
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 jeroenr/6b24b5898859b0373a18cf6f30f57bae to your computer and use it in GitHub Desktop.
Save jeroenr/6b24b5898859b0373a18cf6f30f57bae to your computer and use it in GitHub Desktop.
Prometheus k8s deployment and service
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prometheus
spec:
replicas: 1
template:
metadata:
labels:
app: prometheus
spec:
containers:
- image: prom/prometheus
imagePullPolicy: Always
name: prometheus
volumeMounts:
- name: prom-conf-vol
mountPath: /etc/prometheus
ports:
- containerPort: 9090
volumes:
- name: prom-conf-vol
configMap:
name: prometheus-conf
---
apiVersion: v1
kind: Service
metadata:
name: prometheus-svc
labels:
app: prometheus
spec:
type: LoadBalancer
ports:
- port: 9090
targetPort: 9090
selector:
app: prometheus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment