在尝试将EBS卷挂载到Kubernetes的pod时,我遇到了"special device nount found“错误。下面是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“输出表明有一个"device not found”错误:
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有人知道这是怎么发生的吗?提前谢谢。
发布于 2016-10-28 07:26:06
您的volumeID应该是"vol-xxxxxxxx“,而不是”aws://us-west 2a/vol-xxxxxxxx“。Kubernetes根据集群云提供商设置计算出区域。
https://stackoverflow.com/questions/40295353
复制相似问题