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.54.1 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.2.0 ports: - containerPort: 3000 volumeMounts: - name: grafana-config-volume mountPath: /etc/grafana - name: grafana-data-volume mountPath: /var/lib/grafana - name: grafana-logs-volume mountPath: /var/log/grafana - name: grafana-plugins-volume mountPath: /var/lib/grafana/plugins - name: grafana-provisioning-volume mountPath: /etc/grafana/provisioning 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/config type: Directory - name: grafana-data-volume hostPath: path: /mnt/nfs/AppData/grafana/data type: Directory - name: grafana-logs-volume hostPath: path: /mnt/nfs/AppData/grafana/logs type: Directory - name: grafana-plugins-volume hostPath: path: /mnt/nfs/AppData/grafana/plugins type: Directory - name: grafana-provisioning-volume hostPath: path: /mnt/nfs/AppData/grafana/provisioning type: Directory