简体   繁体   English

装入AzureFile K8S卷时,出现“ azureMount:SmbGlobalMapping失败”错误

[英]When mounting a AzureFile K8S volume, I get a “azureMount: SmbGlobalMapping failed” error

I'm trying to mount an azureFile volume on a Windows K8S pod, but I get the error 我正在尝试在Windows K8S pod上挂载azureFile卷,但出现错误

MountVolume.SetUp failed for volume "azure-file-share" : azureMount: SmbGlobalMapping failed: fork/exec C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe: The parameter is incorrect., only SMB mount is supported now, output: "" 卷“ azure-file-share”的MountVolume.SetUp失败:azureMount:SmbGlobalMapping失败:fork / exec C:\\ Windows \\ System32 \\ WindowsPowerShell \\ v1.0 \\ powershell.exe:参数不正确。仅支持SMB挂载现在,输出:“”

What is wrong? 怎么了?

The issue where was a bad azurestorageaccountkey value in the secret. 问题是秘密中的azurestorageaccountkey值错误。 You can have a secret like: 您可以拥有一个秘密,例如:

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>

What was throwing me was that Azure already base 64 encodes the account key, and it was not clear if you need to double encode it for this secret file. 使我感到困惑的是,Azure已经以base 64为基础对帐户密钥进行编码,并且尚不清楚是否需要对该机密文件进行双重编码。

The answer is yes, you do double encode it. 答案是肯定的,您可以对其进行双重编码。 If you do not, you get the error from the question. 如果不这样做,您将从问题中得到错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM