<p>I am simply trying to deploy this Grafana app as-is, no changes to the YAML have been made: <a href="https://grafana.com/docs/grafana/latest/setup-grafana/installation/kubernetes/" rel="nofollow noreferrer">https://grafana.com/docs/grafana/latest/setup-grafana/installation/kubernetes/</a></p>
<p>VMs are <strong>Ubuntu 20.04 LTS</strong>. The Kubernetes cluster is made up of the Control-Plane/Mstr &amp; 3x Worker nodes:</p>
<pre><code>root@k8s-master:~# kubectl get nodes
NAME          STATUS   ROLES           AGE     VERSION
k8s-master    Ready    control-plane   35d     v1.24.2
k8s-worker1   Ready    worker          4h24m   v1.24.2
k8s-worker2   Ready    worker          4h24m   v1.24.2
k8s-worker3   Ready    worker          4h24m   v1.24.2v
</code></pre>
<p>Other K8s Pods such as NGINX run without issue.</p>
<p>However, the Grafana pod cannot start and is stuck in a Pending state:</p>
<pre><code>root@k8s-master:~# kubectl create -f grafana.yaml
persistentvolumeclaim/grafana-pvc created
deployment.apps/grafana created
service/grafana created
# time passed here...
root@k8s-master:~# kubectl get pods
NAME                                READY   STATUS    RESTARTS       AGE
grafana-9bd5bbd6b-k7ljz             0/1     Pending   0              3h39m
</code></pre>
<p>Troubleshooting this, I found there is an issue with the storage PersistentVolumeClaim (the <code>pvc</code>):</p>
<pre><code>root@k8s-master:~# kubectl get pvc
NAME          STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
grafana-pvc   Pending                                                     2m22s
root@k8s-master:~#
root@k8s-master:~# kubectl describe pvc grafana-pvc
Name:          grafana-pvc
Namespace:     default
StorageClass:
Status:        Pending
Volume:
Labels:        &lt;none&gt;
Annotations:   &lt;none&gt;
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Used By:       grafana-9bd5bbd6b-k7ljz
Events:
  Type    Reason         Age                  From                         Message
  ----    ------         ----                 ----                         -------
  Normal  FailedBinding  6s (x11 over 2m30s)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set   
</code></pre>
<p><strong>UPDATE:</strong>
I created a StorageClass and set it as default:</p>
<pre><code>root@k8s-master:~# kubectl get sc
NAME                PROVISIONER      RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
generic (default)   no-provisioner   Delete          Immediate           false                  19m
</code></pre>
<p>I also created a PersistentVolume:</p>
<pre><code>root@k8s-master:~# kubectl get pv
NAME             CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS     CLAIM                   STORAGECLASS   REASON   AGE
task-pv-volume   10Gi       RWO            Retain           Released   default/task-pv-claim   manual                  12m  
</code></pre>
<p>However, now when I try to deploy the Grafana PVC it is still stuck - why?</p>
<pre><code>root@k8s-master:~# kubectl get pvc
NAME          STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
grafana-pvc   Pending                                      generic        4m16s
root@k8s-master:~# kubectl describe pvc grafana-pvc
Name:          grafana-pvc
Namespace:     default
StorageClass:  generic
Status:        Pending
Volume:
Labels:        &lt;none&gt;
Annotations:   volume.beta.kubernetes.io/storage-provisioner: no-provisioner
               volume.kubernetes.io/storage-provisioner: no-provisioner
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Used By:       grafana-9bd5bbd6b-mmqs6
               grafana-9bd5bbd6b-pvhtm
               grafana-9bd5bbd6b-rtwgj
Events:
  Type    Reason                Age                   From                         Message
  ----    ------                ----                  ----                         -------
  Normal  ExternalProvisioning  12s (x19 over 4m27s)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner &quot;no-provisioner&quot; or manually created by system administrator
</code></pre>

SamAndrew81
<p>I have tried creating a Grafana configuration file from the <a href="https://grafana.com/docs/grafana/latest/setup-grafana/installation/kubernetes/#create-grafana-kubernetes-manifest" rel="nofollow noreferrer">documentation</a>, and was able to create successfully. The pod has a Running state, also the PVC(PersistentVolumeClaim) shows the Storage class as <strong>standard</strong>.</p>
<p>The below is the output of PVC:</p>
<pre><code>$ kubectl describe pvc grafana-pvc

Name:          grafana-pvc
Namespace:     default
StorageClass:  standard
Status:        Bound
Volume:        pvc-ee20cc5d-6ca5-4075-b5f3-d1a6323a5241
Labels:        &lt;none&gt;
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
               volume.beta.kubernetes.io/storage-provisioner: pd.csi.storage.gke.io
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       grafana-75789d79d4-wbgtv
Events:        &lt;none&gt;
</code></pre>
<p>But in your use case the StorageClass field is showing as empty. So, try deleting the existing one and recreate the Grafana configuration file. If you were not able to create and are still facing the same error message which is “no persistent volumes available for this claim and no storage class is set” then you will have to create PV(<a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">PersistentVolume</a>).</p>
<p>Because, your error says, &quot;<strong>Your PVC hasn't found a matching PV and you also haven't mentioned any storageClass name</strong>&quot;. After you create the PersistentVolumeClaim, the Kubernetes control plane looks for a PersistentVolume that satisfies the claim's requirements. If the control plane finds a suitable PersistentVolume with the same StorageClass, it binds the claim to the volume.</p>
<p>In order to resolve your issue you will need to create a StorageClass with no-provisioner and then create a PV(PersistentVolume) by defining this storageClassName. Then you have to create PVC and Pod/Deployment .</p>
<p>Refer to <a href="https://stackoverflow.com/a/55849106/15745153">stackpost1</a> and <a href="https://stackoverflow.com/a/63557664/15745153">stackpost2</a> for more information.</p>
