[英]Azure ACS AzureFile Dynamic Persistent Volume Claim
I am trying to Dynamically provision storage using a storageclass I've defined with type azure-file. 我正在尝试使用我已经用azure-file类型定义的存储类动态地调配存储。 I've tried setting both the parameters in the storageclass for storageAccount and skuName.
我试过在storageAccount和skuName的storageclass中设置两个参数。 Here is my example with storageAccount set.
这是我设置了storageAccount的示例。
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: azuretestfilestorage
namespace: kube-system
provisioner: kubernetes.io/azure-file
parameters:
storageAccount: <storage_account_name>
The storageclass is created successfully however when I try to create a persistent volume claim using this storage class the persistent volume create fails with this error: storageclass创建成功,但是当我尝试使用该存储类创建持久卷声明时,持久卷创建失败,并显示以下错误:
Failed to provision volume with StorageClass "azuretestfilestorage": failed to find a matching storage account
Here is the code for my persistentvolumeclaim 这是我的持久音量声明的代码
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: logging-persistent-volume-claim-test
namespace: kube-system
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: azuretestfilestorage
My storageaccount is definitely in the same resource group and data center location as my acs cluster. 我的存储帐户肯定与acs群集位于同一资源组和数据中心位置。 My understanding is that a secret, persistent volume, and file share should be automatically generated.
我的理解是,应该自动生成一个秘密的持久卷和文件共享。 Instead I just get stuck in a pending state w/ the above error.
相反,我只是停留在带有上述错误的挂起状态。
Here is the output of my kubectl version command 这是我的kubectl version命令的输出
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-07T12:22:21Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.7", GitCommit:"8e1552342355496b62754e61ad5f802a0f3f1fa7", GitTreeState:"clean", BuildDate:"2017-09-28T23:56:03Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Any input would be appreciated. 任何输入将不胜感激。 Thanks!
谢谢!
I emailed microsoft azure support about this and received an answer. 我通过电子邮件向Microsoft Azure支持小组发送了电子邮件,并收到了答案。
There is a bug in acs kubernetes version 1.7.7 that does not allow for dynamic persistent volume claims to work if your --cluster-name value in “/etc/kubernetes/manifests/kube-controller-manager.yaml” of the master node VM is greater than 16 characters. acs kubernetes 1.7.7版中存在一个错误,如果您在主目录的“ /etc/kubernetes/manifests/kube-controller-manager.yaml”中的--cluster-name值,则不允许动态持久卷声明起作用节点VM大于16个字符。 Very obscure bug.
非常模糊的错误。 The fix is to upgrade your cluster or re-deploy with a different name.
解决方法是升级群集或使用其他名称重新部署。
Here is bug report: https://github.com/andyzhangx/demo/blob/master/issues/azurefile-issues.md#4-azure-file-dynamic-provision-failed-due-to-cluster-name-length-issue 这是错误报告: https : //github.com/andyzhangx/demo/blob/master/issues/azurefile-issues.md#4-azure-file-dynamic-provision-failed-due-to-cluster-name-length -问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.