<p>Hello i'm trying to mount a windows share to a linux container. The way i'm trying to do this:</p>
<ul>
<li>Mount windows share to kubernetes pod (running in linux machine)</li>
<li>Mount that drive into linux container</li>
</ul>
<p>I run into a brick wall after trying lots of solutions. Last thing i tried was to edit kubernetes config.yml to mount drives the way i want. But i don't know or find any way to pass proxy credentials to config.yml</p>
<p>My config file (Example of how i'm trying to do. Original file is too long.):</p>
<pre><code>spec:
  containers:
    name: app
    securityContext:
      capabilities:
        add:
        - SYS_ADMIN
        - DAC_READ_SEARCH
    volumeMounts:
    - mountPath: /mount/winshare
      name: nfs-volume
  volumes:
  - name: nfs-volume
    nfs:
      path: /E8_iT-Consultants/Upload
      server: &lt;--server--Ip--&gt;
</code></pre>
<p>How can I add credentials under &quot;volumes:&quot; tag?
Is there a way to achieve what I want to do in any other way?
I'm open to any suggestions.</p>

Husnucan Sen
<p>Windows shares are using CIFS protocol, not NFS. NFS is not using login/password for authentication/authorization, its trust model is based on IP addresses of clients, and on Kerberos tokens in some more advanced configurations, so you can't provide any credentials when using NFS.</p>
<p>There is no out-of-the box support for CIFS in kubernetes, but there is a community project that implements flexvolume plugin - <a href="https://github.com/fstab/cifs" rel="nofollow noreferrer">https://github.com/fstab/cifs</a></p>
<p>See <a href="https://stackoverflow.com/questions/67632578/accessing-cifs-files-from-pods">Accessing CIFS files from pods</a> for more details on how to use this plugin.</p>
