【发布时间】: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