![](/img/trans.png)
[英]Windows Host Docker + WSL2 - How to mount Windows directory to a Linux container
[英]How to mount a windows share to a pod and into linux container inside a linux host (Windows share is behind proxy auth.)
您好,我正在嘗試將 windows 共享安裝到 linux 容器。 我試圖這樣做的方式:
在嘗試了很多解決方案后,我遇到了磚牆。 我嘗試的最后一件事是編輯 kubernetes config.yml 以按照我想要的方式安裝驅動器。 但我不知道或找不到任何方法將代理憑據傳遞給 config.yml
我的配置文件(我嘗試做的示例。原始文件太長。):
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: <--server--Ip-->
如何在“volumes:”標簽下添加憑據? 有沒有辦法以任何其他方式實現我想做的事情? 我願意接受任何建議。
Windows 共享使用 CIFS 協議,而不是 NFS。 NFS 不使用登錄名/密碼進行身份驗證/授權,它的信任 model 是基於客戶端的 IP 地址,以及一些更高級配置中的 Kerberos 令牌,因此在使用 NFS 時您不能提供任何憑據。
kubernetes 中沒有對 CIFS 的開箱即用支持,但是有一個實現 flexvolume 插件的社區項目 - https://github.com/fstab/cifs
有關如何使用此插件的更多詳細信息,請參閱從 pod 訪問 CIFS 文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.