【问题标题】:"special device nount found" error occured when mounting AWS EBS volume to Kubernetes' pod将 AWS EBS 卷挂载到 Kubernetes 的 pod 时发生“未找到特殊设备”错误
【发布时间】:2016-10-28 07:26:06
【问题描述】:

我在尝试将 EBS 卷挂载到 Kubernetes 的 pod 时遇到“发现特殊设备名词”错误。 这是 pod 的 yaml 文件:

apiVersion: v1
kind: Pod
metadata:
  name: test-ebs
spec:
  containers:
  - image: gcr.io/google_containers/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /test-ebs
      name: test-volume
  volumes:
  - name: test-volume
    # This AWS EBS volume must already exist.
    awsElasticBlockStore:
      volumeID: aws://us-west-2a/vol-xxxxxxxx
      fsType: ext4

运行 pod 后,pod 状态卡在“ContainerCreating”。 “kubectl describe pod”输出表明存在“未找到设备”错误:

SetUp failed for volume "kubernetes.io/aws-ebs/8e830149-9c95-11e6-b969-0691ac4fce05-test-volume" (spec.Name: "test-volume") pod "8e830149-9c95-11e6-b969-0691ac4fce05" (UID: "8e830149-9c95-11e6-b969-0691ac4fce05") with: mount failed: exit status 32 Mounting arguments: /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-west-2a/vol-xxxxxxxx /var/lib/kubelet/pods/8e830149-9c95-11e6-b969-0691ac4fce05/volumes/kubernetes.io~aws-ebs/test-volume  [bind]
Output: mount: special device /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-west-2a/vol-xxxxxxxx does not exist

有人知道这是怎么回事吗?提前致谢。

【问题讨论】:

    标签: amazon-web-services kubernetes


    【解决方案1】:

    您的 volumeID 应该只是“vol-xxxxxxxx”而不是“aws://us-west-2a/vol-xxxxxxxx”。 Kubernetes 根据集群云提供商设置确定区域。

    【讨论】:

      猜你喜欢
      • 2014-09-27
      • 2021-10-30
      • 2017-02-27
      • 2021-11-22
      • 2011-07-12
      • 1970-01-01
      • 2018-06-10
      • 1970-01-01
      • 2021-01-28
      相关资源
      最近更新 更多