首页 > 解决方案 > 安装 AzureFile K8S 卷时,我收到“azureMount: SmbGlobalMapping failed”错误

问题描述

我正在尝试azureFile在 Windows K8S pod 上安装卷,但出现错误

MountVolume.SetUp failed for volume "azure-file-share" : azureMount: SmbGlobalMapping failed: fork/exec C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe: 参数不正确,仅支持 SMB 挂载现在,输出:“”

怎么了?

标签: azurekubernetes

解决方案


azurestorageaccountkey秘密中价值不高的问题。你可以有一个秘密,如:

apiVersion: v1
kind: Secret
metadata:
  name: volume-azurefile-storage-secret
type: Opaque
data:
  azurestorageaccountname: <base 64 encoded account name>
  azurestorageaccountkey: <base 64 encoded account key>

让我感到震惊的是,Azure 已经对帐户密钥进行了 base 64 编码,并且不清楚您是否需要为这个秘密文件对其进行双重编码。

答案是肯定的,你确实对它进行了双重编码。如果你不这样做,你会从问题中得到错误。


推荐阅读