Created
June 21, 2018 12:12
-
-
Save mateobur/aa9ce08ca331cfa686874567a093e557 to your computer and use it in GitHub Desktop.
Prometheus monitoring Kubernetes example file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: prometheus-deployment | |
labels: | |
app: prometheus | |
purpose: example | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: prometheus | |
purpose: example | |
template: | |
metadata: | |
labels: | |
app: prometheus | |
purpose: example | |
spec: | |
containers: | |
- name: prometheus-example | |
image: prom/prometheus | |
volumeMounts: | |
- name: config-volume | |
mountPath: /etc/prometheus/prometheus.yml | |
subPath: prometheus.yml | |
ports: | |
- containerPort: 9090 | |
volumes: | |
- name: config-volume | |
configMap: | |
name: prometheus-example-cm | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: prometheus-example-service | |
spec: | |
selector: | |
app: prometheus | |
purpose: example | |
ports: | |
- name: promui | |
protocol: TCP | |
port: 9090 | |
targetPort: 9090 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment