apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app: grafana
  template:
    metadata:
      labels:
        app: grafana
      name: grafana
    spec:
      containers:
        - image: grafana/grafana:latest
          imagePullPolicy: Always
          name: grafana
          ports:
            - containerPort: 3000
              name: grafana
              protocol: TCP
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: grafana-storage
      volumes:
        - emptyDir: {}
          name: grafana-storage
