<p>I created a Azure file share and I am able to connect to it using map network drive in my laptop having windows 10. I created a hello-world spring boot application with volume mount configurations for azure file share and trying to deploy in Kubernetes in docker-desktop. But my pod doesn't starts -</p>
<pre><code>hello-world-9d7479c4d-26mv2   0/1     ContainerCreating   0          15s
</code></pre>
<p>Here is the error I can see in events when I describe the POD -</p>
<pre><code>Events:
  Type     Reason       Age              From                     Message
  ----     ------       ----             ----                     -------
  Normal   Scheduled    9h                                        Successfully assigned default/hello-world-9d7479c4d-26mv2 to docker-desktop
  Warning  FailedMount  9h (x7 over 9h)  kubelet, docker-desktop  MountVolume.SetUp failed for volume &quot;fileshare-pv&quot; : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t cifs -o file_mode=0777,dir_mode=0777,vers=3.0,&lt;masked&gt; //mystorage.file.core.windows.net/myshare /var/lib/kubelet/pods/425012d1-13ee-4c40-bf40-d2f7ccfe5954/volumes/kubernetes.io~azure-file/fileshare-pv
Output: mount: /var/lib/kubelet/pods/425012d1-13ee-4c40-bf40-d2f7ccfe5954/volumes/kubernetes.io~azure-file/fileshare-pv: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.&lt;type&gt; helper program.
</code></pre>
<p>Then I updated my Dockerfile to install cifs-utils -</p>
<pre><code>FROM ubuntu:16.04
# Install Java
RUN apt-get update &amp;&amp; \
    apt-get install -y openjdk-8-jdk &amp;&amp; \
    apt-get install -y ant &amp;&amp; \
    apt-get install -y cifs-utils &amp;&amp; \
    apt-get clean;

ENV PORT 8080
EXPOSE 8080
COPY target/*.jar /opt/app.jar
WORKDIR /opt
CMD [&quot;java&quot;, &quot;-jar&quot;, &quot;app.jar&quot;]
</code></pre>
<p>Still that error doesn't go. I googled a lot for solution but no luck. Is there any limitation in using azure file share with kubernates container in docker-desktop [windows machine]?</p>
<p>Here are my K8 configurations -</p>
<p><strong>secret.yaml</strong></p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: storage-secret
  namespace: default
type: Opaque
data:
  azurestorageaccountname: BASE64-encoded-account-name
  azurestorageaccountkey: BASE64-encoded-account-key
</code></pre>
<p><strong>pv.yaml</strong></p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: fileshare-pv
  labels:
    usage: fileshare-pv
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  azureFile:
    secretName: storage-secret
    shareName: myshare
    readOnly: false
</code></pre>
<p><strong>pvc.yaml</strong></p>
<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: fileshare-pvc
  namespace: default
  # Set this annotation to NOT let Kubernetes automatically create
  # a persistent volume for this volume claim.
  annotations:
    volume.beta.kubernetes.io/storage-class: &quot;&quot;
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  selector:
    # To make sure we match the claim with the exact volume, match the label
    matchLabels:
      usage: fileshare-pv
</code></pre>
<p><strong>deployment.yaml</strong></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-world
  namespace: default
  labels:
    app: hello-world
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hello-world
  template:
    metadata:
      labels:
        app: hello-world
    spec:
      containers:
        - name: hello-world-pod
          image: 'hello-world-k8:1.0'
          volumeMounts:
          - name: azure
            mountPath: /azureshare
          ports:
            - containerPort: 8080
      volumes:
      - name: azure
        persistentVolumeClaim:
          claimName: fileshare-pvc      
---
apiVersion: v1
kind: Service
metadata:
  name: hello-world-service
  namespace: default
spec:
  selector:
    app: hello-world
  ports:
  - name: http
    protocol: TCP
    port: 8080
    targetPort: 8080
  type: LoadBalancer
</code></pre>

<p>You likely need to install a package that knows how to mount that file system. For NFS this may be nfs-common with Debian/Ubuntu.</p>
<p><code>sudo apt update &amp;&amp; sudo apt install nfs-common -y</code></p>
