<p>I'm using AKS, I am trying to create a statefulset with pvc from yaml.
It looks like pvc created successfully and is bound.
but I see that the pod state is <em>CrashLoopBackOff</em>
When I use <em>describe</em> on the pod, i get this events:</p>
<pre><code>  Type     Reason                  Age                    From                                        Message
  ----     ------                  ----                   ----                                        -------
  Warning  FailedScheduling        38m (x2 over 38m)      default-scheduler                           pod has unbound immediate PersistentVolumeClaims (repeated 2 times)
  Normal   Scheduled               38m                    default-scheduler                           Successfully assigned default/janusgraph-test3-0 to aks-agentpool-26199593-vmss000000
  Normal   SuccessfulAttachVolume  37m                    attachdetach-controller                     AttachVolume.Attach succeeded for volume &quot;pvc-00b88841-a21d-430c-9f2f-b65307b156c2&quot;
  Normal   Pulled                  34m (x4 over 37m)      kubelet, aks-agentpool-26199593-vmss000000  Successfully pulled image &quot;janusgraph/janusgraph:latest&quot;
  Normal   Created                 34m (x4 over 37m)      kubelet, aks-agentpool-26199593-vmss000000  Created container janusgraph-test3
  Normal   Started                 34m (x4 over 37m)      kubelet, aks-agentpool-26199593-vmss000000  Started container janusgraph-test3
  Normal   Pulling                 32m (x5 over 37m)      kubelet, aks-agentpool-26199593-vmss000000  Pulling image &quot;janusgraph/janusgraph:latest&quot;
  Warning  BackOff                 2m42s (x124 over 36m)  kubelet, aks-agentpool-26199593-vmss000000  Back-off restarting failed container
</code></pre>
<p>The PVC is:</p>
<pre><code>  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes: [&quot;ReadWriteOnce&quot;]
        storageClassName: &quot;default&quot;
        resources:
          requests:
            storage: 7Gi
</code></pre>
<p>When I run descibe on the PVC, i get this event (which means all GOOD!):</p>
<pre><code>  Type       Reason                 Age   From                         Message
  ----       ------                 ----  ----                         -------
  Normal     ProvisioningSucceeded  19m   persistentvolume-controller  Successfully provisioned volume pvc-00b88841-a21d-430c-9f2f-b65307b156c2 using kubernetes.io/azure-disk
</code></pre>
<p>here is the full describe pvc info:</p>
<pre><code>Name:          data-janusgraph-test3-0
Namespace:     default
StorageClass:  default
Status:        Bound
Volume:        pvc-00b88841-a21d-430c-9f2f-b65307b156c2
Labels:        app=janusgraph-test3
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
               volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/azure-disk
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      7Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Events:
  Type       Reason                 Age   From                         Message
  ----       ------                 ----  ----                         -------
  Normal     ProvisioningSucceeded  19m   persistentvolume-controller  Successfully provisioned volume pvc-00b88841-a21d-430c-9f2f-b65307b156c2 using kubernetes.io/azure-disk
Mounted By:  janusgraph-test3-0
</code></pre>
<p>Based on the above info, I have no clue what really went wrong, when I look at similar issues on the web, I can find that usually it related to different read/write access, but obviously this is not the case here, since there is no error regarding this one. and in addition, I already created 2 more stateful sets in my AKS that use the same type of configuration, just different statefulset names.</p>
<p>---- Update:
In addition, running <em>kubectl logs</em> on the pod is showing this:</p>
<pre><code>waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
waiting for storage...
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /var/lib/janusgraph/jmx_prometheus_javaagent-0.13.0.jar
</code></pre>
<p>As you can see now, the container storage is not really attached for some reason, (the error of the JAR is just a side effect I guess).
any idea?</p>

toto
<p>Pods being in <code>CrashLoopBackOff</code> state means there is some problem with the scripts that is being run inside the container.</p>
<p>Check for output for <code>kubectl logs</code> command to see why the pods are crashing.</p>
