---
apiVersion: v1
kind: Service
metadata:
name: grafana
labels:
app: grafana
spec:
ports:
- name: 3000-tcp
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: grafana
---
apiVersion: v1
kind: Service
metadata:
name: prometheus
labels:
app: prometheus
spec:
ports:
- name: 9090-tcp
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: prometheus
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- image: registry.redhat.io/rhel8/grafana:7
name: grafana
ports:
- containerPort: 3000
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: prometheus
name: prometheus
spec:
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
spec:
serviceAccountName: prometheus
containers:
- image: quay.io/prometheus/prometheus:v2.36.0
name: prometheus
ports:
- containerPort: 9090
protocol: TCP
volumeMounts:
- mountPath: /prometheus
name: volume-data
- mountPath: /etc/prometheus/prometheus.yml
name: volume-config
subPath: prometheus.yml
volumes:
- emptyDir: {}
name: volume-data
- configMap:
defaultMode: 420
name: prometheus-config
name: volume-config
---
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-config
data:
prometheus.yml: ""
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
---
---
apiVersion: v1
kind: Service
metadata:
name: grafana
labels:
app: grafana
spec:
ports:
- name: 3000-tcp
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: grafana
---
apiVersion: v1
kind: Service
metadata:
name: prometheus
labels:
app: prometheus
spec:
ports:
- name: 9090-tcp
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: prometheus
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- image: registry.redhat.io/rhel8/grafana:7
name: grafana
ports:
- containerPort: 3000
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: prometheus
name: prometheus
spec:
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
spec:
serviceAccountName: prometheus
containers:
- image: quay.io/prometheus/prometheus:v2.36.0
name: prometheus
ports:
- containerPort: 9090
protocol: TCP
volumeMounts:
- mountPath: /prometheus
name: volume-data
- mountPath: /etc/prometheus/prometheus.yml
name: volume-config
subPath: prometheus.yml
volumes:
- emptyDir: {}
name: volume-data
- configMap:
defaultMode: 420
name: prometheus-config
name: volume-config
---
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-config
data:
prometheus.yml: ""
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
---
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow