Prometheus packaged for running under Kubernetes.
669
This runs Prometheus using a special controller that monitors a configmap and automatically reloads Prometheus whenever the configmap changes.
apiVersion: v1
kind: Pod
metadata:
name: prometheus
labels:
app: prometheus
spec:
containers:
- name: prometheus
image: atombender/prometheus-k8s:v1.0-latest
imagePullPolicy: Always
ports:
- containerPort: 9090
protocol: TCP
livenessProbe:
httpGet:
path: /metrics
port: 9090
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
volumeMounts:
- name: configs
mountPath: /mnt/prometheus-config
- name: data
mountPath: /mnt/prometheus-data
env:
- name: PROMETHEUS_K8S_CONFIGROOT
value: /mnt/prometheus-config
- name: PROMETHEUS_K8S_DATADIR
value: /mnt/prometheus-data
- name: PROMETHEUS_K8S_ARGS
value: "-alertmanager.url=http://alertmanager/"
volumes:
- name: configs
configMap:
name: prometheus
- name: data
emptyDir:
PROMETHEUS_K8S_CONFIGROOT — sets the folder in which configuration files are written. Defaults to /config. Must contain prometheus.yml.PROMETHEUS_K8S_CONFIGMAP — sets the name of the configmap to watch, using the format [ns]/[name]. Defaults to default/prometheus.PROMETHEUS_K8S_DATADIR — Prometheus data directory. Defaults to /var/prometheus.PROMETHEUS_K8S_ARGS — additional arguments to pass to Prometheus, e.g. -alertmanager.url.Prometheus version number is prefixed: v1.0-latest is Prometheus 1.0.
Content type
Image
Digest
Size
92 MB
Last updated
about 10 years ago
docker pull atombender/prometheus-k8s:v1.0-latest