apiVersion: apps/v1 kind: Deployment metadata: name: prometheus namespace: prometheus labels: app: prometheus spec: strategy: rollingUpdate: null type: Recreate selector: matchLabels: app: prometheus template: metadata: labels: app: prometheus spec: securityContext: runAsUser: 0 runAsGroup: 0 containers: - name: prometheus image: prom/prometheus:v2.53.0 args: - "--storage.tsdb.retention.time=14d" - "--config.file=/etc/prometheus/prometheus.yaml" - "--storage.tsdb.path=/prometheus/" ports: - containerPort: 9090 resources: requests: cpu: 500m memory: 500M limits: cpu: "1" memory: 2Gi volumeMounts: - name: prometheus-config-volume mountPath: /etc/prometheus/ - name: prometheus-storage-volume mountPath: /prometheus/ - name: grafana image: grafana/grafana:11.0.1 ports: - containerPort: 3000 volumeMounts: - name: grafana-config-volume mountPath: /usr/share/grafana - name: grafana-storage-volume mountPath: /var/lib/grafana volumes: - name: prometheus-config-volume hostPath: path: /mnt/nfs/AppData/prometheus/conf type: Directory - name: prometheus-storage-volume hostPath: path: /mnt/nfs/AppData/prometheus/storage type: Directory - name: grafana-config-volume hostPath: path: /mnt/nfs/AppData/grafana/conf type: Directory - name: grafana-storage-volume hostPath: path: /mnt/nfs/AppData/grafana/storage type: Directory