首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure k8s中的错误con (不支持卷功能)

Azure k8s中的错误con (不支持卷功能)
EN

Stack Overflow用户
提问于 2022-08-03 11:11:42
回答 1查看 531关注 0票数 1

我在蔚蓝k8s集群(4Gb标准硬盘)中创建了磁盘,我使用的是代码PV

Pv文件

然后我创建了PVC:

PVC yaml

把我的音量附在Pod上:

吊舱体积随员

但是当我检查我的Pod状态时,我发现了一个错误:

代码语言:javascript
复制
root@k8s:/home/azureuser/k8s# kubectl get describe pods mypod
error: the server doesn't have a resource type "describe"
root@k8s:/home/azureuser/k8s# kubectl describe pods mypod
Name:         mypod
Namespace:    default
Priority:     0
Node:         aks-agentpool-37412589-vmss000000/10.224.0.4
Start Time:   Wed, 03 Aug 2022 10:34:45 +0000
Labels:       <none>
Annotations:  <none>
Status:       Pending
IP:           
IPs:          <none>
Containers:
  mypod:
    Container ID:   
    Image:          mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine
    Image ID:       
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Limits:
      cpu:     250m
      memory:  256Mi
    Requests:
      cpu:        100m
      memory:     128Mi
    Environment:  <none>
    Mounts:
      /mnt/azure from azure (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-nq9q2 (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  azure:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  pvc-azuredisk
    ReadOnly:   false
  kube-api-access-nq9q2:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 node.kubernetes.io/memory-pressure:NoSchedule op=Exists
                             node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason              Age                 From                     Message
  ----     ------              ----                ----                     -------
  Normal   Scheduled           2m2s                default-scheduler        Successfully assigned default/mypod to aks-agentpool-36264904-vmss000000
  Warning  FailedAttachVolume  53s (x8 over 2m1s)  attachdetach-controller  AttachVolume.Attach failed for volume "pv-azuredisk" : rpc error: code = InvalidArgument desc = Volume capability not supported

你能帮我提个建议吗,我怎么能解决这个问题:Warning FailedAttachVolume 53s (x8 over 2m1s) attachdetach-controller AttachVolume.Attach failed for volume "pv-azuredisk" : rpc error: code = InvalidArgument desc = Volume capability not supported

EN

回答 1

Stack Overflow用户

发布于 2022-08-03 13:33:22

不支持...Volume能力

尝试更新您的PV:

代码语言:javascript
复制
...
accessModes:
  - ReadWriteOnce  # <-- ReadWriteMany is not supported by disk.csi.azure.com
...

ReadWriteMany由file.csi.azure.com (Azure Files)支持。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73220730

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档