
apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus-server
  labels:
    app: prometheus
    component: server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prometheus
      component: server
  template:
    metadata:
      labels:
        app: prometheus
        component: server
    spec:
      serviceAccountName: prometheus
      containers:
      - name: prometheus
        image: prom/prometheus
        args:
        - --config.file=/conf/prometheus.yaml
        ports:
        - containerPort: 9090
        volumeMounts:
        - name: config
          mountPath: /conf
          readOnly: true
      volumes:
      - name: config
        configMap:
          name: prometheus-server
