apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus
  labels:
    app: prometheus
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prometheus
  template:
    metadata:
      labels:
        app: prometheus
    spec:
      serviceAccountName: prometheus 
      containers:
        - name: prometheus
          image: prom/prometheus
          resources: {}
          volumeMounts:
            - mountPath: /etc/prometheus
              name: prometheus-conf
            - mountPath: /prometheus
              name: prometheus
      restartPolicy: Always
      volumes:
        - name: prometheus-conf
          configMap:
            name: prometheus
            items:
              - key: prometheus.yml
                path: prometheus.yml
        - name: prometheus
          hostPath:
            path: /var/k8s/volumes/default/prometheus
