简体   繁体   中英

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

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: ""

What is wrong?

The issue where was a bad azurestorageaccountkey value in the secret. 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.

The answer is yes, you do double encode it. If you do not, you get the error from the question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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