<p>I am following <a href="https://learn.microsoft.com/en-us/azure/aks/azure-files-volume" rel="nofollow noreferrer">setting up the Azure File share to the pod</a>.</p>
<ul>
<li>created the namespace</li>
<li>created the secrets as specified</li>
<li>pod configuration</li>
</ul>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Pod
metadata:
  name: test-storage-pod
  namespace: storage-test 
spec:
  containers:
  - image: nginx:latest 
    name: test-storage-pod
    resources:
      requests:
        cpu: 100m
        memory: 128Mi
      limits:
        cpu: 250m
        memory: 256Mi
    volumeMounts:
      - name: azure
        mountPath: /mnt/azure-filestore
  volumes:
  - name: azure
    azureFile:
      secretName: azure-storage-secret
      shareName: appdata/data
      readOnly: false
</code></pre>
<ul>
<li><code>kubectl describe -n storage-test pod/&lt;pod-name&gt;</code> or <code>kubectl get -n storage-test event</code></li>
</ul>
<pre><code>LAST SEEN   TYPE      REASON        OBJECT                 MESSAGE
2m13s       Normal    Scheduled     pod/test-storage-pod   Successfully assigned storage-test/test-storage-pod to aks-default-1231523-vmss00001a
6s          Warning   FailedMount   pod/test-storage-pod   MountVolume.SetUp failed for volume &quot;azure&quot; : Couldn't get secret default/azure-storage-secret
11s         Warning   FailedMount   pod/test-storage-pod   Unable to attach or mount volumes: unmounted volumes=[azure], unattached volumes=[default-token-gzxk8 azure]: timed out waiting for the condition
</code></pre>
<p>Question:</p>
<ul>
<li>the secret is created under the namespace storage-test as well, is that Kubelet first checks the storage under default namespace?</li>
</ul>

Tim
<p>Probably you are working default namespace, that's why Kubelet first checks the default namespace. Please try to switch to your created namespace with the command:</p>
<blockquote>
<p>kubens storage-test</p>
</blockquote>
<p>Try to run your pod under storage-test namespace once again.</p>
