<p>I need to install Grafana Loki with Prometheus in my Kubernetes cluster. So I followed the below to install them. It basically uses Helm to install it. Below is the command which I executed to install it.</p>
<pre><code>helm upgrade --install loki grafana/loki-stack  --set grafana.enabled=true,prometheus.enabled=true,prometheus.alertmanager.persistentVolume.enabled=false,prometheus.server.persistentVolume.enabled=false,loki.persistence.enabled=true,loki.persistence.storageClassName=standard,loki.persistence.size=5Gi -n monitoring --create-namespace
</code></pre>
<p>I followed the <a href="https://grafana.com/docs/loki/latest/installation/helm/" rel="nofollow noreferrer">official Grafana website</a> in this case.</p>
<p>But when I execute the above helm command, I get the below error. In fact, I'm new to Helm.</p>
<pre><code>Release &quot;loki&quot; does not exist. Installing it now.
W0307 16:54:55.764184 1474330 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
Error: rendered manifests contain a resource that already exists. Unable to continue with install: PodSecurityPolicy &quot;loki-grafana&quot; in namespace &quot;&quot; exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key &quot;meta.helm.sh/release-name&quot; must equal &quot;loki&quot;: current value is &quot;loki-grafana&quot;
</code></pre>
<p>I don't see any Grafana chart installed.</p>
<pre><code>helm list -A
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
cert-manager    cert-manager    1               2021-11-26 13:07:26.103036078 +0000 UTC deployed        cert-manager-v0.16.1    v0.16.1
ingress-nginx   ingress-basic   1               2021-11-18 12:23:28.476712359 +0000 UTC deployed        ingress-nginx-4.0.8     1.0.5
</code></pre>

Container-Man
<p>Well, I was able to get through my issue. The issue was &quot;PodSecurityPolicy&quot;. I deleted the existing Grafana PodSecurityPolicy and it worked.</p>
