<p>We are using prometheus-operator with the for several month which working great.
Now we need to add persistent volume to save the data for 3 month and we use the following.</p>
<p><a href="https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack" rel="nofollow noreferrer">https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack</a></p>
<p>I've added the following: (we have gp2 storage class)</p>
<pre><code>storageSpec:
  volumeClaimTemplate:
    spec:
      storageClassName: gp2
      accessModes: [&quot;ReadWriteOnce&quot;]
      resources:
        requests:
          storage: 50Gi
</code></pre>
<p><a href="https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L1969" rel="nofollow noreferrer">https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L1969</a></p>
<p>And I got error:</p>
<pre><code>persistentvolumeclaim &quot;prometheus-po-kube-prometheus-stack-prometheus-db-prometheus-po-kube-prometheus-stack-prometheus-0&quot; not found,
</code></pre>
<p>should I add something in addition to the values.yaml?</p>

<p>You are missing components reference, you have to specify for which component you define storage - <code>prometheus.prometheusSpec</code></p>
<p>Try this:</p>
<pre><code>prometheus:
  prometheusSpec:
    storageSpec:
      volumeClaimTemplate:
        spec:
          accessModes: [ &quot;ReadWriteOnce&quot; ]
          resources:
            requests:
              storage: 50Gi
          storageClassName: gp2
</code></pre>
<p>You can find more in <a href="https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L1969" rel="nofollow noreferrer">values.yaml</a></p>
