【发布时间】:2019-07-19 14:02:14
【问题描述】:
我正在尝试在 Windows AKS pod 上安装 azureFile 卷,但出现错误:
kubelet,MountVolume.SetUp 对卷“fileshare”失败: New-SmbGlobalMapping 失败:fork/exec C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe: 参数不正确,输出:""
我的 pod.yml 看起来像:
apiVersion: v1
kind: Pod
metadata:
name: q-pod-sample-03
namespace: mq
spec:
containers:
- image: test.azurecr.io/q/p:01
name: q-ctr-sample-03
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: azfileshare
mountPath: 'c:/app/app-data'
nodeSelector:
"beta.kubernetes.io/os": windows
volumes:
- name: azfs
azureFile:
secretName: qastapv-share-01-secret
shareName: qastapv-share-01
readOnly: false
我的 secret.yml 看起来像:
apiVersion: v1
kind: Secret
metadata:
name: qastapv-share-01-secret
namespace: mq
type: Opaque
data:
azurestorageaccountname: <Base64Str>
azurestorageaccountkey: <Base64Str>
我的 PV 是这样的:
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-azfs-q-01
namespace: mq
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteMany
azureFile:
secretName: qastapv-share-01-secret
shareName: qastapv-share-01
readOnly: false
mountOptions:
- dir_mode=0777
- file_mode=0777
- uid=1000
- gid=1000
我在这里缺少什么? 我正在使用 AKS 1.14。
【问题讨论】:
标签: kubernetes azure-aks