Issue accessing Azure Files - File not Found error from Pod logs

1/18/2018

I have below configuration in place for accessing Azure Files from my application deployment:

volumeMounts:
      - name: lhapidatasource
        mountPath: /mnt/azure

My deployment is successfully running, but when i look at my application logs which tries to access files from my azure file location, it says " File not Found "

/mnt/azure/openapidevshare/datasources/location.csv not found.

My Azure file is configured properly and i have above file present in the azure file location when i look into it from azure portal.

So please help me in identifying the issue. Also i would like to know if there is a way to check pod contents like what is present in it for example what is actually present in "/mnt/azure" as per my volume mount config.

-- Anil Kumar P
azure
kubernetes

1 Answer

1/18/2018

The error was due to how paths are constructed in the container.

kubectl exec -it podname /bin/bash

this command allowed the asker to inspect paths manually and adjust those

-- 4c74356b41
Source: StackOverflow