title: How can I give grafana user appropriate permission so that it can start successfully?
body: <p>env:</p>
  
  <pre><code>kubernetes provider: gke
  kubernetes version: v1.13.12-gke.25
  grafana version: 6.6.2 (official image)
  </code></pre>
  
  <p>grafana deployment manifest:</p>
  
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: grafana
    namespace: monitoring
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: grafana
    template:
      metadata:
        name: grafana
        labels:
          app: grafana
      spec:
        containers:
        - name: grafana
          image: grafana/grafana:6.6.2
          ports:
          - name: grafana
            containerPort: 3000
          # securityContext:
          #     runAsUser: 104
          #     allowPrivilegeEscalation: true
          resources:
            limits:
              memory: "1Gi"
              cpu: "500m"
            requests: 
              memory: "500Mi"
              cpu: "100m"
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: grafana-storage
        volumes:
          - name: grafana-storage
            persistentVolumeClaim:
                claimName: grafana-pvc
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>when I deployed this grafana dashboard first time, its working fine. after sometime I restarted the pod to check whether volume mount is working or not. after restarting, I getting below error.</p>
  
  <pre><code>mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
  GF_PATHS_DATA='/var/lib/grafana' is not writable.
  You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later
  </code></pre>
  
  <p>what I understand from this error, user could create these files. How can I give this user appropriate permission to start grafana successfully?</p>