title: AKS Dynamic Persistent Volume Claim using Azure Disk
body: <p>I am following the article mentioned below for creating dynamic persistent volume claims.</p>
  <blockquote>
  <p><a href="https://docs.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv</a></p>
  </blockquote>
  <p>I created a Persistent volume claim using :</p>
  <pre><code>apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: taskmanager-01
  spec:
    accessModes:
    - ReadWriteOnce
    storageClassName: managed-premium
    resources:
      requests:
        storage: 16Gi
  </code></pre>
  <h2>Question 01 :</h2>
  <p>From what I understand, the Persistent Volume and the actual underlying disk will be provisioned when this is created.</p>
  <p>Is this correct ?</p>
  <h2>Question 02 :</h2>
  <pre><code>kubectl get pvc -n &lt;namespace&gt;
  </code></pre>
  <p>returns me the status of my PVC as <code>Pending</code>. I get the following errors in the kubernetes event list</p>
  <pre><code>Failed to provision volume with StorageClass &quot;managed-premium&quot;: 
  
  azure.BearerAuthorizer#WithAuthorization: 
  Failed to refresh the Token for request to 
  
  https://management.azure.com/subscriptions/xxxx/resourceGroups/MC_XXXX/providers/Microsoft.Compute/disks/kubernetes-dynamic-pvc-651cef89-49ae-11e9-8104-0a58ac1f222a?api-version=2016-04-30-preview: 
  
  StatusCode=401 
  Original Error: adal: Refresh request failed. Status Code = '401'.
  
  
  {
    &quot;error&quot;: &quot;invalid_client&quot;,
    &quot;error_description&quot;: &quot;AADSTS7000215: Invalid client secret is provided.\r\n
   Trace ID: xxxx\r\nCorrelation ID: xxxxr\nTimestamp: 2019-03-18 18:49:42Z&quot;,
    &quot;error_codes&quot;: [
      7000215
    ],
    &quot;timestamp&quot;: &quot;2019-03-18 18:49:42Z&quot;,
    &quot;trace_id&quot;: &quot;xxxx&quot;,
    &quot;correlation_id&quot;: &quot;xxxx&quot;
  }
  </code></pre>