--- /dev/null
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: prom-config
+data:
+ prom-config: |
+ global:
+ scrape_interval: 30s
+
+ scrape_configs:
+ - job_name: "otel-collector"
+ static_configs:
+ - targets: [ "otel-collector.default.svc.cluster.local:8887" ]
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: prometheus
+spec:
+ selector:
+ matchLabels:
+ app: prometheus
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: prometheus
+ spec:
+ volumes:
+ - name: prom-config-vol
+ configMap:
+ name: prom-config
+ items:
+ - key: prom-config
+ path: prometheus.yml
+ containers:
+ - name: prometheus
+ image: prom/prometheus:latest
+ ports:
+ - containerPort: 9090
+ volumeMounts:
+ - name: prom-config-vol
+ mountPath: /etc/prometheus
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: prometheus
+ labels:
+ app: prometheus
+spec:
+ selector:
+ app: prometheus
+ ports:
+ - port: 9090
+ name: prometheus-http-frontend
+ protocol: TCP
+ targetPort: 9090