简体   繁体   English

Azure ACS AzureFile动态持久卷声明

[英]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.

相关问题 通过动态持久卷创建AzureFile持久卷时,声明创建的AzureFile没有元数据 - When creating a AzureFile persistent volume via a dynamic persistent volume claim the AzureFile created has no metadata Azure Kubernetes 服务 - 持久卷/持久卷声明更改权限 - Azure Kubernetes Service - Persistent Volume / Persistent Volume Claim change permissions 将新卷附加到持久卷声明 (Kubernetes) - Attaching New Volume to Persistent Volume Claim (Kubernetes) Kubernetes使用azureFile持久化卷 - Kubernetes persistent volumes with azureFile 我们如何创建基于天蓝色磁盘的持久卷声明并从 Kubernetes 中的 POD 使用它们? - How can we create azure-disk based persistent volume claim and use them from a POD in Kubernetes? 是否可以在Azure ACS中配置规则,以便我可以将声明值与通配符/正则表达式匹配? - Is it possible to configure a rule in Azure ACS so that I can match a claim value with a wildcard/regular expression? 如何将身份提供者声明值映射到Azure ACS中注册的身份提供者或从中映射? - How to map identity provider claim value to/from identity provider registered in Azure ACS? ACS中的MyOpenID:添加必需的声明类型 - MyOpenID in ACS: adding required claim types ACS规则组:如果另一个声明具有给定值,则添加一个声明 - ACS Rule Groups: add a claim if another claim has a given value 使用服务主体为持久卷配置 static Azure 文件 - Use Service Principal to provision static Azure Files for Persistent Volume
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM