apiVersion: apps/v1 kind: Deployment metadata: name: prometheus namespace: prometheus labels: app: prometheus spec: replicas: 1 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=12h" - "--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/ 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