我尝试在Kubernetes pod中安装azure存储帐户(在Azure德国):
apiVersion: v1
kind: Pod
metadata:
name: storagetest
spec:
containers:
- image: nginx
name: nginx
volumeMounts:
- name: azure
mountPath: /mnt/azure
volumes:
- name: azure
azureFile:
secretName: azure-secret
shareName: clusterstorage
readOnly: false
我使用以下文件
创建了azure-secretapiVersion: v1
kind: Secret
metadata:
name: azure-secret
type: Opaque
data:
azurestorageaccountname:base64AccoutnName
azurestorageaccountkey: base64Key
当我启动pod时,收到以下错误消息:
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/a8a3e443-2135-11e8-8482-0017fa10471a/volumes/kubernetes.io~azure-file/azure --scope -- mount -t cifs -o username=clusterstorage,password=***,file_mode=0755,dir_mode=0755,vers=3.0 //....file.core.windows.net/... /var/lib/kubelet/pods/...volumes/kubernetes.io~azure-file/azure
Output: Running scope as unit run-....scope.
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
我注意到卷url是xxx.file.core.windows.net,我的端点地址以file.core.cloudapi.de结尾。
然后我找到了Azure File的源代码,并在那里看到了硬编码的后缀。
如何在Azure德国中更改后缀以使用Kubernetes的AzureFile?