Created
June 22, 2018 09:14
-
-
Save mateobur/042905499db9824118027fd68d05986b to your computer and use it in GitHub Desktop.
Redis Prometheus monitoring guide
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: redis | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
annotations: | |
prometheus.io/scrape: "true" | |
prometheus.io/port: "9121" | |
labels: | |
app: redis | |
spec: | |
containers: | |
- name: redis | |
image: redis:4 | |
resources: | |
requests: | |
cpu: 100m | |
memory: 100Mi | |
ports: | |
- containerPort: 6379 | |
- name: redis-exporter | |
image: oliver006/redis_exporter:latest | |
resources: | |
requests: | |
cpu: 100m | |
memory: 100Mi | |
ports: | |
- containerPort: 9121 | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: redis | |
spec: | |
selector: | |
app: redis | |
ports: | |
- name: redis | |
protocol: TCP | |
port: 6379 | |
targetPort: 6379 | |
- name: prom | |
protocol: TCP | |
port: 9121 | |
targetPort: 9121 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment