簡體   English   中英

attachdetach-controller AttachVolume.NewAttacher 卷“pv”失敗:無法獲取 AWS 雲提供商。 GetCloudProvider 返回<nil></nil>

[英]attachdetach-controller AttachVolume.NewAttacher failed for volume "pv" :Failed to get AWS Cloud Provider. GetCloudProvider returned <nil>

Warning FailedMount 23m (x55 over 3h) kubelet, ip-172-31-3-191.us-east-2.compute.internal Unable to attach or mount volumes: unmounted volumes=[mysql-persistent-storage], unattached volumes=[mysql-persistent-storage default-token-6vkr2]: timed out waiting for the condition
Warning FailedMount 4m (x105 over 3h7m) kubelet, ip-172-31-3-191.us-east-2.compute.internal (combined from similar events): MountVolume.SetUp failed for volume "pv" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/408ffa6b-1f64-4f1a-adfd-01b77ad7b886/volumes/kubernetes.ioaws-ebs/pv --scope -- mount -o bind /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-2a/vol-011d7bb42da888b82 /var/lib/kubelet/pods/408ffa6b-1f64-4f1a-adfd-01b77ad7b886/volumes/kubernetes.ioaws-ebs/pv
Output: Running scope as unit run-9240.scope.
mount: /var/lib/kubelet/pods/408ffa6b-1f64-4f1a-adfd-01b77ad7b886/volumes/kubernetes.io~aws-ebs/pv: special device /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-2a/vol-011d7bb42da888b82 does not exist.
Warning FailedAttachVolume 2m38s (x92 over 3h7m) attachdetach-controller AttachVolume.NewAttacher failed for volume "pv" : Failed to get AWS Cloud Provider. GetCloudProvider returned instead

我在AWS EC2機器上運行kube.netes集群。

當我嘗試附加EBS卷時出現上述錯誤。

至少有三種可能的解決方案:

  • 檢查你的k8s版本; 也許你會想要更新它;
  • 在您的基礎設施上安裝NFS
  • 修復inbound CIDR 規則

k8s版本

有一個已知問題: MountVolume.SetUp failed for volume pvc mount failed: exit status 32 · Issue #77916 · kube.netes/kube.netes

它已在#77663中修復

所以,檢查你的k8s版本

kubectl version
kubeadm version

在您的基礎架構上安裝 NFS

對於像您這樣的情況,安裝NFS有幫助的三個答案:

A: 49571145 A: 52457325 A: 55922445

修復入站 CIDR 規則

解決方案之一是將集群的 CIDR 添加到

答:61868673

我遇到這個問題是因為 Kube.netes 集群節點 CIDR 范圍不存在於我的 AWS EC2 實例(我的 NFS 服務器運行的地方)的安全組的入站規則中

解決方案:將我的 Kube.netes cluser 節點 CIDR 范圍添加到安全組的入站規則。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM