挂载AWS ELB卷,挂载点不存在

时间:2015-10-29 20:23:50

标签: kubernetes coreos

我在AWS中构建了一个CoreOS Kubernetes(1.0.7)群集,除了Volumes之外,一切似乎都在游泳。在启动配置了卷的RC之前,我在与节点相同的区域中手动创建卷。如下:

 apiVersion: v1
 kind: ReplicationController
 metadata:
   name: jenkins
 spec:
   replicas: 1
   selector:
     app: jenkins
   template:
     metadata:
       labels:
         app: jenkins
     spec:
       containers:
       - name: jenkins
         image: jenkins
         ports:
         - containerPort: 8080
         - containerPort: 50000
         volumeMounts:
         - name: "jenkins-data"
           mountPath: "/var/jenkins_home"
         livenessProbe:
           httpGet:
             path: /
             port: 8080
           initialDelaySeconds: 60
           timeoutSeconds: 180
       volumes:
       - name: "jenkins-data"
         awsElasticBlockStore:
           volumeID: aws://us-east-1c/vol-abcd123
           fsType: ext4

pod开始出现,但等待卷装入。卷正确地附加到实例(我在fdisk中看到它)但是当我开始登录kublet时无法正确安装:

 safe_format_and_mount[1504]: Running: fsck.ext4 -a /dev/xvdf
 safe_format_and_mount[1508]: /dev/xvdf: clean, 11/655360 files, 79663/2621440 blocks
 safe_format_and_mount[1513]: Running: mount -o discard,defaults /dev/xvdf /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-1c/vol-abcd123
 safe_format_and_mount[1516]: mount: mount point /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-1c/vol-abcd123 does not exist
 safe_format_and_mount[1519]: Disk /dev/xvdf looks formatted but won't mount.  Giving up.

现在错误是正确的,/var/lib/kubelet/plugins目录存在但是从那里出来是空的。好像我在这里错过了一些应该创建这个目录的东西?我查看过以前的问题,看过很多关于safe_format_and_mount但是没有看到任何有关该目录的信息。有什么想法吗?

0 个答案:

没有答案